delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/22/21:35:38

From: Charles Krug <charles AT pentek DOT com>
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: <ww01-BHLJZN2260 AT netaddress DOT usa DOT net>
NNTP-Posting-Host: mail.pentek.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019