RM> I recently wrote a teensy program to play a small tune, and used
RM> the line
RM> #define C# 271
RM> to define the integer frequency of C Sharp. The compiler (BC++4)
RM> objected to the # in C#. I thought the preprocessor was a true
RM> macro processor, and could handle abominations like that. Why was I
RM> wrong?
In
#define xxx yyy
the xxx is an identifier. An identifier is defined as a sequence
of alpha + _ + digits, starting with a non-digit. FREQ ANSI_C.*
from 3:711/934 for more info.
RM> _:
RM> I've always been puzzled by the use of the leading underscore in C
RM> programs. It's a standard character like a,b,c as far as the
RM> compiler is concerned, but it appears at the front of some
^^^^
RM> constants and functions as if it has some magical significance.
^^^^^^^^^^^^^^^^^^^^^^^
RM> What is this significance?
There are no special constants or functions that start with _ that
I am aware of in the C standard.
However, identifiers starting with _ followed by a capital letter,
OR two __, are RESERVED for internal use by the C compiler. FREQ
PDPCLIB from 3:711/934 for an implementation of a C compiler that
makes use of this reserved feature. BFN. Paul.
@EOT:
---
* Origin: X (3:711/934.9)
|