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

Erik Max Francis max at alcyone.com
Mon Oct 23 23:19:19 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.

Makes perfect sense, if you that you read C declarations from the inside
out.

C is not a trivial language, so the rules are not trivial.  If you have
sloppy thinking or are not familiar with the details of the language,
you will get yourself into trouble with a non-trivial language.  But
then that's true of a trivial language as well.

-- 
 Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
 __ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/  \ Who, my friend, can scale Heaven?
\__/ _The Epic of Gilgamesh_
    REALpolitik / http://www.realpolitik.com/
 Get your own customized newsfeed online in realtime ... for free!



More information about the Python-list mailing list