delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/08/17/07:10:33

From: Radical NetSurfer <radsmail AT juno DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: where is __FILE__/__DATE__ ?
Date: Wed, 16 Aug 2000 12:36:42 -0400
Message-ID: <o9glpsk29ic6nhovs8rr6siagp9a2o38dv@4ax.com>
X-Newsreader: Forte Agent 1.8/32.548
X-No-Archive: yes
MIME-Version: 1.0
NNTP-Posting-Host: 216.202.134.204
X-Original-NNTP-Posting-Host: 216.202.134.204
X-Trace: 16 Aug 2000 12:39:33 -0400, 216.202.134.204
Lines: 41
X-Original-NNTP-Posting-Host: 64.31.79.51
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Does DJGPP suppport __FILE__, __DATE__, __LINE__, etc?

I saw that __STDC__ exists, __GNUC__, only.


In Borland I can do something this, which I find VERY USEFUL:

(topmost line in source)
#pragma message Compiling __FILE__ on __DATE__ at __TIME__ 
#pragma message Current Line __LINE__

Which, obviously, simply displays, at Compile Time, the Filename of
the source-code, and the Date/Time stamp of that particular compile.
Likewise, I can see the actual line number whenever desired at any
point in my source code... 
(despite the use of #pragma, my question still relates to having and
 using __FILE__, etc.)

NOW: how would I do this simplistic thing in DJGPP ?

If they are currently not a feature, dear Mr. D.J., PLEASE add them.

I know that my compiled programs look very nice now when I use
these features sparingly and wisely.  And when re-directed into a file
for logging purposes, the Date and Time prove vital!!

THANKS!

Email is welcomed: radsmail AT juno DOT com
Http:  members.tripod.com/~RadSurfer/

-----
alternative (temporary) solution:

date 
time 
gcc ...
cleanup

in a batch file...sheesh.

- Raw text -


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