From Dave@occl-cam.demon.co.uk  Wed Jan 29 00:10:16 1997
Received: from relay-7.mail.demon.net (relay-7.mail.demon.net [194.217.242.9]) by dkuug.dk (8.6.12/8.6.12) with SMTP id AAA02899 for <sc22wg5@dkuug.dk>; Wed, 29 Jan 1997 00:10:14 +0100
Received: from occl-cam.demon.co.uk ([158.152.56.116]) by relay-5.mail.demon.net
           id aa517215; 28 Jan 97 20:52 GMT
Received: by occl-cam.demon.co.uk (IBM OS/2 SENDMAIL VERSION 1.3.9)/(3.0sos)
	  id AA0761; Tue, 28 Jan 97 18:02:12 GMT
Message-Id: <9701281802.AA0761@occl-cam.demon.co.uk>
In-Reply-To: <199701272135.WAA23043@dkuug.dk>
Date: Tue, 28 Jan 97 17:55:31 GMT
From: Dave Lloyd <Dave@occl-cam.demon.co.uk>
To: maine@altair.dfrc.nasa.gov
Cc: sc22wg5@dkuug.dk
Subject: (SC22WG5.1271) Informal Review of Source Processing Draft Standard

Richard Maine <maine@altair.dfrc.nasa.gov> writes:
> 2. I have long considered the #ifdef construct and its relatives
>    to be a horribly designed feature in that it is extremely
>    error prone.  It is inherently vulnerable to typos.  If you
>    mistype the name, either in the #define or the #ifdef, then
>    you just get the wrong result - no error message.  Even getting
>    the case of a letter wrong will mess you up, or mistyping
>    O for 0.  I've made such mistakes with cpp more than once myself,
>    and I've helped other people debug when they made it.  I am opposed
>    to copying this misfeature.  I much prefer to see something like in
>    the Fortran language (or for that matter the C language), where you
>    test the value of variables instead of testing whether the variable
>    is defined or not.

Agree most strongly! Another good reason to avoid an extra layer of 
macro expansion on top of normal Fortran is that it makes writing 
source-form tools a complete pig as you can see completely different 
syntax depending on the #define settings (often supplied by the 
compiler). For example the C tool makef which automatically builds 
headers from the exports is easily confused by macros that expand 
out to a procedure definition head - such as in use in gcc.

Macro-expansion or other source-generation tools should come *before*
Fortran source.

Regards,
----------------------------------------------------------------------
Dave Lloyd                            mailto:Dave@occl-cam.demon.co.uk
Oxford and Cambridge Compilers Ltd    http://www.occl-cam.demon.co.uk/
Cambridge, England                    http://www.chaos.org.uk/~dave/
