Subject: Re: Conditional Compilation..

From: [email-masked] (N ARUNASALAM)
Date: Mon, 7 Dec 92 18:40:57 -0800

(response to comments from Robert L. Knighten)

>After a substantial debate INCLUDE became part of Fortran 90, but it is not
>actually of much value for portability because of the impossibility of a
>portable specification of what is to be included.  

I agree that INCLUDE by itself doesn't contribute to portability. Together
with conditional compilation, however, it can be used quite effectively across
different platforms and project environments.                                                         

(response to Robert K's response to Harvey R's response)

>ANSI C certainly defines the linguistic aspects of the C
>preprocessor, but not its interaction with the programming environment.
>The conditional compilation features of C are useful primarily when various
>preprocesor constants can be defined in the external environment or on the
>command line of the compiler.  This is what is not specified.

Typically we define just one project specific name via the command line.
This definition is then used in a subsystem-wide "options definition file".
So the non-portability of the command line definition is a minor 
inconvenience... compared to the improvements we gain in software
maintainability.

(response to Mary  Zosel' comments)
                                                                   
>I can bring the topic up in the HPF F-90 subgroup meeting this week -
>but without a very simple, concrete proposal I can't hold out much
>hope.  (I suppose one simple - relatively concrete - proposal would
>be that each vendor should make cpp work with their HPF - but that
>might be quite controversial.)

Regarding the CPP proposal, perhaps some vendors will see this as an 
opportunity for product differentiation. My wishlist for conditional
compilation would include the following minimal set:       
                                                                               
%define name                                          
%undefine  name
%include  filename
%if-defined  name
%if-not-defined name    } not quite the minimal set!  
%else-if-defined name   }         "
%else
%end-if

The pre-processor should support nested conditional compilation
statements...
I hopes this helps in defining something simple and concrete.

N "Aru" Arunasalam                    e-mail: [email-masked]
ABB Systems Control Inc.,
2550 Walsh Road,
Santa Clara, CA 95051

---

From: "Len Moss" <[email-masked]>
Date: Tue, 15 Dec 1992 09:53 -0800 (PST)

In-Reply-To: [email-masked] -- 12/07/92 18:54

>[stuff omitted]

Jeanne Martin (a member of X3J3 and convernor of its ISO
counterpart, WG5) has done some work on a concrete proposal for a
standard Fortran preprocessor, which is quite a bit more
"Fortran-like" than CPP.  The most recent draft that I'm aware of is
from July, 1990 and can be found in the WG5 distribution (ISO/IEC
JTC1/SC22/WG5 N539).  With Jeanne's permission, I'd be happy to mail
paper copies to anyone interested (sorry, I don't have an electronic
copy -- but perhaps Jeanne will contribute one?).

PS: I just talked to Jeanne and she said she'd see if she could
find an electronic copy of her preprocessor proposal.  She also
reminded me that at one point Fortran 8x included a conditional
compilation facility, but it was later removed, mainly to reduce
the overall size of the language.

--
Leonard J. Moss <[email-masked]>   | My views don't necessarily
Stanford Linear Accelerator Center, MS 97 | reflect those of SLAC,
Stanford, CA   94309                      | Stanford or the DOE