Re: out of memory, even tho remembered nothing!
- Posted by DerekParnell (admin) Oct 25, 2012
- 1280 views
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 ABCwould define 'XYZ' as '-1 *2' which the complier would evaluate as -2.
#define EOF = (-1) #define ABC = (*2) #define XYZ = EOF ABCwould define 'XYZ' as '(-1) (*2)' which the complier would treat as a syntax error.