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

Ben Wolfson wolfson at midway.uchicago.edu
Mon Oct 23 23:25:21 EDT 2000


In article <39F4FFB7.452EDDEC at alcyone.com>,
Erik Max Francis  <max at alcyone.com> wrote:
>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.

So with

int (*a)[5];

you start with a)[ and proceed outwards?

>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.

A non-trivial language needn't have tortured syntax.


-- 
BTR  |  It is a symptome of Melancholy to be afraid of death, and yet
sometimes to desire it; this latter I have often discovered in my selfe, and
thinke noe man ever desired life as I have sometimes Death.
 -- Thomas Browne, _Religio Medici_



More information about the Python-list mailing list