Ferenc Tamas Gyurcsan writes:
> I though I would warn everybody about a little mistake that caused me a
> one-day-headache:
> Do not ever use CurrentTime as a variable name. The reason is:
> X.h: #define CurrentTime 0L /* special Time */
> But to find the bug, it's a pain. All you can see is: parse error before 0L.
Ha! That's the story of my life.
I'll never forget the day that I had to port one of my apps over to
Windows NT. My app extensively used RFC2233/RFC1573 and it used the
identifier "interface" all over the place in the code.
Well, somewhere in Microsoft's VC++ header files they have a line that
looks like this:
#define interface struct
(my guess: a fan of Java put this into the headers)
So, code that looks like this:
int interface;
gets turned into this:
int struct;
which definitely doesn't compile.
Well, my code only had around 600 references to "interface" in the
code... And guess what? I couldn't just blindly search and replace
this either, because in many places "interface" was used in a
character string.
Thanks Microsoft for wasting around 3 hours of my time!
--kevin (whose current project had the misfortune of using the
identifier "far" all over the place for variable names...)
--
Kevin D. Clark | |
[EMAIL PROTECTED] | [EMAIL PROTECTED] | Give me a decent UNIX
Cabletron Systems, Inc. | PGP Key Available | and I can move the world
Durham, N.H. (USA) | |
**********************************************************
To unsubscribe from this list, send mail to
[EMAIL PROTECTED] with the following text in the
*body* (*not* the subject line) of the letter:
unsubscribe gnhlug
**********************************************************