PL/I preprocessor: Difference between revisions

Content deleted Content added
BG19bot (talk | contribs)
m WP:CHECKWIKI error fix for #61. Punctuation goes before References. Do general fixes if a problem exists. - using AWB
Evolution: 1965, 1966 PL/I spec
Line 107:
 
==Evolution==
A '''1964''' report on "NPL"<ref>{{cite book|last=IBM Corporation|title=NPL Technical Report|year=1964|url=http://bitsavers.informatik.uni-stuttgart.de/pdf/ibm/360/pli/320-0908_NPL_Technical_Report_Dec64.pdf}}</ref>{{rp|pp.109-114}}, as PL/I was called at the time, provided that macro procedures, identified by the keyword ''MACRO'', could use the complete facilities of the language. The following compile-time statements were allowed in open code:
* <code>%DECLARE</code> &ndash; both fixed-length and varying character strings were defined.
* %''%assignment''
* %''%null statement''
* <code>IF ''compile-time comparisoncompile_time_comparison'' THEN ''unit'' [ELSE ''unit'']</code> &ndash; this causes one or the other ''unit'' to be included in the source.
* <code>%GOTO</code>
 
"NPL" as defined in this manual was never implemented.
 
In '''1965''' an update to IBM's ''PL/I Language specification'' defined an even less ambitious preprocessor language<ref>{{cite book|last=IBM Corporation|title=IBM Operating System/360 PL/I: Language Specifications (C28-6571-1)|year=1965|url=http://bitsavers.informatik.uni-stuttgart.de/pdf/ibm/360/pli/C28-6571-1_PL_I_Language_Specifications_Jul65.pdf}}</ref>{{rp|pp.131-133}}. All mention of preprocessor preprocessor procedures was omitted. The following compile-time statements were specified:
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|year=1966|month=August|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|year=1966|month=August|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. The proposals bear little resemblance to the preprocessor as eventually implemented. Rosin credits [[MAD (programming language)|MAD]] with the only previous example of a macro processor in a high-level language.
* <code>%DECLARE</code>
* ''%assignment''
* ''%null statement''
* <code>IF ''compile_time_comparison'' THEN GOTO label</code> &ndash; No ''ELSE'' clause was defined.
* <code>%GOTO</code>
 
This language specification was again never implemented, however a '''1966''' revision of this manual restored preprocessor procedures with the now-current <code>%PROCEDURE ...%END</code> syntax and brought the specification close to what was actually included in PL/I(F)<ref>{{cite book|last=IBM Corporation|title=IBM Operating System/360 PL/I: Language Specifications (C28-6571-3)|year=1966|url=http://bitsavers.informatik.uni-stuttgart.de/pdf/ibm/360/pli/C28-6571-3_PL_I_Language_Specifications_Jul66.pdf}}</ref>{{rp|pp.132-139}}. Fixed-length character variables were gone. New statements added were:
* <code>%ACTIVATE</code>
* <code>%DEACTIVATE</code>
* <code>%DO [''preprocessor_variable'' = ''preprocessor_expression'' TO ''preprocessor_expression'' [BY ''preprocessor_expression'']]</code>
* <code>%INCLUDE</code>
* <code>&IF</code> &ndash; the <code>IF ''compile_time_comparison'' THEN ''unit'' [ELSE ''unit'']</code> was restored.
 
A single compile-time builtin, ''SUBSTR'', was added.
InAlso 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|year=1966|month=August|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|year=1966|month=August|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. The proposals bear little resemblance to the preprocessor as eventually implemented. Rosin credits [[MAD (programming language)|MAD]] withas the only previous example of a macro processor in a high-level language.
 
==See also==