Path: utzoo!utgpu!watmath!clyde!bellcore!rutgers!ucsd!sdcsvax!ucsdhub!hp-sdd!hplabs!hpda!hpcuhb!hpcllla!hpclisp!hpclscu!shankar
From: shankar@hpclscu.HP.COM (Shankar Unni)
Newsgroups: comp.lang.pascal
Subject: Extended Pascal: Lack of Pragmas :-(
Message-ID: <950013@hpclscu.HP.COM>
Date: 8 Dec 88 00:30:26 GMT
Organization: HP CSG/DLD California Language Lab
Lines: 35

One thing that pisses me off about the Extended Pascal standard is that there
has been *NO ATTEMPT* to standardise at least a SYNTAX for pragmas within
the source. Never mind implementing a few like "include" and "if/ifdef" (can
you see my C bias showing through?)

Both INCLUDE's and IF/IFDEF's are ESSENTIAL for any program that must be 
targeted at widely different machines. Now don't get me wrong: I'm not 
saying that it is impossible to do so (I've heard all the arguments about
"isolating system-dependent code in modules of their own and re-writing
them for different systems"), but still, for convenience and efficiency,
there is no beating conditional compilation.

There are also other applications for conditional compilation. Both of my
previous projects (one in Pascal (Pascal compiler) and one in C (C compiler
 :-)) were being enhanced. While the enhancement process was going on, we
had to keep producing versions of the old product. The only reasonable way
to do this was conditional compilation

   (
    #ifdef ANSI
       code for handling ANSI C features...
    #endif
   )

Can you do *this* using Extended Pascal?


You see, every vendor is going to implement pragmas in their compiler. Let's
not bury our heads like Ostriches and pretend that the problem doesn't exist.
At the very least, let's design a syntax for pragmas in Extended Pascal.


HERE'S ONE VOTE FOR  CPP!!
---
Shankar (ex-Pascal hack) Unni.