PL/I preprocessor: Difference between revisions

Content deleted Content added
m <pre> for unsupported lang
FrescoBot (talk | contribs)
m Bot: link syntax and minor changes
Line 23:
==Preprocessor operation==
 
The preprocessor operates by scanning the input text and recognizing declared ''preprocessor names'', also called ''preprocessor identifiers''. The text is copied to the preprocessor output with the preprocessor names replaced with their current values. The name may represent a call to a ''preprocessor procedure'' ([[Macro (computer science)|macro)]]). Replacement text may be rescanned by the preprocessor for possible additional replacement.
 
===Preprocessor data types===
Line 59:
==Preprocessor built-ins==
 
These are the built-ins for IBM's ''PL/I for MVS and VM'' compiler.<ref name=PLI1.1>{{cite book|last=IBM Corporation|title=IBM PL/I for MVS & VM Language Reference|year=1995}}</ref>{{rp|pp.404–406}} There can be considerable difference in the built-ins provided among preprocessors of various PL/I compilers.
* {{code|COMPILETIME}} &mdash; returns the date and time of compilation as a character string such as "15 SEP 12 15:30:00" for September 15, 2012 3:30PM (local time).
* {{code|COUNTER}} &mdash; returns a character string containing a number that is "00001" for the first call to {{code|COUNTER}} and increases by one for each subsequent call.
Line 131:
* <code>&IF</code> &ndash; the <code>IF <var>compile_time_comparison</var> THEN <var>unit</var> [ELSE <var>unit</var>]</code> was restored.
 
A single compile-time builtin, <code>SUBSTR</code>, was added.
Also in 1966 Robert Rosin published a pair of articles<ref>{{cite journal|last=Rosin|first=Robert|title=PL/I Macro Processor - Progress Report|journal=PL/I Bulletin|date=August 1966|issue=2|url=http://www.iron-spring.com/PLI_Bulletins/PLI_Bulletin_2.pdf|accessdate=January 22, 2013}}</ref><ref>{{cite journal|last=Rosin|first=Robert|title=Macros in PL/I|journal=PL/I Bulletin|date=August 1966|issue=2|url=http://www.iron-spring.com/PLI_Bulletins/PLI_Bulletin_2.pdf|accessdate=January 22, 2013}}</ref> discussing development of the preprocessor. This development was based in a "[[SHARE (computing)|SHARE]] XXVI Memo" from earlier the same year and a paper by Mark Elson. Rosin credits [[MAD (programming language)|MAD]] as the only previous example of a macro processor in a high-level language.
 
==See also==
* [[C preprocessor]]
 
==References==