Mail Archives: djgpp/1997/08/22/21:35:38
Guan Foo Wah wrote:
>
> I have seem many source code with the word #pragma. I do not know what
> this means. My C book (Teach Yourself C in 21 Days) did not give me any
> info about this. The only thing I know is it is a preprocessor command.
>
> Can anyone care to explain to me what is #pragma. Is it ANSI
> compatible ??
#pragma is "standard". I am fairly certain that it is also ANSI. It is
INTENDED to be used to access features that are platform or compiler
dependent. The compilers I've worked with have all used #defines, as
in #define _____DJGPP____, with a whole heap 'o underscores to achieve
the same functionality as #pragma.
I'm curious--were you able to teach yourself to read in 21 days? Or did
it require, say, six or seven years of daily practice? :)
Try the FAQ for comp.lang.c for more C oddities.
Also refer to the book "Obfuscated C and Other Mysteries" for an
exploration of C's darker nooks and crannies.
--
Charles Krug, Jr.
- Raw text -