From: Charles Krug Newsgroups: comp.os.msdos.djgpp Subject: Re: Question about #pragma Date: Tue, 19 Aug 1997 09:11:38 +0100 Lines: 24 Message-ID: <33F9553A.5DE8@pentek.com> References: NNTP-Posting-Host: mail.pentek.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk 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.