Re: out of memory, even tho remembered nothing!

new topic     » goto parent     » topic index » view thread      » older message » newer message
petelomax said...

And I'd be very surprised if it wasn't. I was trying to say that the () mislead me into thinking EOF had been defined as a sequence, when actually it is an atom.

This is a throwback to a defensive programming practice by C coders. In C, when defining a macro it used to be a good idea to enclose the macro's definition in parenthesis to prevent accidental text appending in the source code.

#define EOF = -1 
#define ABC = *2 
#define XYZ = EOF ABC 
would define 'XYZ' as '-1 *2' which the complier would evaluate as -2.

#define EOF = (-1) 
#define ABC = (*2) 
#define XYZ = EOF ABC 
would define 'XYZ' as '(-1) (*2)' which the complier would treat as a syntax error.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu