C's syntax (was Re: Python Formatted C Converter (PfCC))

Darren New dnew at san.rr.com
Wed Oct 25 13:18:41 EDT 2000


Rainer Deyke wrote:
> int (*a)[5], *(b[5]);
> 
> It looks like 'a' is an array of pointers and 'b' is a pointer to an array,
> but the opposite is the case.

Actually, the right way to read this is
  (*a)[0] is an int;
  *(b[0]) is an int;

Not backwards. Makes perfect sense if you accept it.

-- 
Darren New / Senior MTS & Free Radical / Invisible Worlds Inc.
San Diego, CA, USA (PST).  Cryptokeys on demand.
The tragedy of the commons applies to monitizing eyeballs, too.



More information about the Python-list mailing list