www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/06/03/10:02:22

From: kagel AT quasar DOT bloomberg DOT com
Date: Mon, 3 Jun 1996 09:54:33 -0400
Message-Id: <9606031354.AA01621@quasar.bloomberg.com >
To: eliz AT is DOT elta DOT co DOT il
Cc: rkwcvdz AT rivier1 DOT puk DOT ac DOT za, djgpp AT delorie DOT com
In-Reply-To: <Pine.SUN.3.91.960603074853.20822C-100000@is> (message from Eli Zaretskii on Mon, 3 Jun 1996 07:50:57 +0200 (IST))
Subject: Re: Moving from Pascal to Djgpp
Reply-To: kagel AT dg1 DOT bloomberg DOT com

   Date: Mon, 3 Jun 1996 07:50:57 +0200 (IST)
   From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>

   On Thu, 30 May 1996 kagel AT quasar DOT bloomberg DOT com wrote:

   > BTW: Many compilers do not support preprocessor directives that do not begin in
   > column 1.  GCC, and therefore DJGPP, does, as does Borland, but this may cause
   > potability problems.

   I don't see any portability problem here, since ANSI C explicitly permits 
   any amount of whitespace (and even comments) to surround the `#' 
   character in preprocessor directives.  Hardly anyone should consider 
   pre-ANSI compilers nowadays.

The problem, as usual, is not with what should be but with what is.  You do not
always have a choice of compilers.  There are supposedly ANSI compilers that do
not support newer preprocessor constructs like whitespace around '#' and string
pasting, etc.  The DEC compilers come immediately to mind!  It is usually
politic (small 'p') to write to the lowest common denominator when avoiding a
feature cost you nothing.  Anyway it was just an aside and suggestion.
Obviously, if your code cannot run on anything other than DOS where you have at
least four excellent compilers available there is no problem.  On the other
hand if you, or anyone else reading our thread, need to write portable programs
this is one of those "Gee I didn't know that" gotcha's that one might want to
know about!  And so I mentioned it...

-- 
Art S. Kagel, kagel AT quasar DOT bloomberg DOT com

A proverb is no proverb to you 'till life has illustrated it.  -- John Keats

- Raw text -


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