Category:Polyglot:PL/I and PL/M: Difference between revisions

Content added Content deleted
(→‎Include Files: Removed declaration of "eof")
m (→‎PL/I and PL/M: A few more notes.)
Line 4: Line 4:
<br><br>
<br><br>
===PL/I and PL/M===
===PL/I and PL/M===
Although similar, [[PL/I]] and [[PL/M]] are not the same language. However some features of the languages can be exploited to make sources that are valid in both languages - although some stylisation is required.
Although similar, [[PL/I]] and [[PL/M]] are not the same language. A relatively simple pre-compiler could probably handle the differences for simple programs, but why write a pre-compiler when fetures of the languages/compilers can be exploited to make sources that are valid in both PL/I and PL/M ( even if some stylisation is required ) ?
<p>
<p>
In this, the PL/M language as implemented by Gary Kildall's original [[8080 PL/M Compiler]] will be considered.
In this, the PL/M language as implemented by Gary Kildall's original [[8080 PL/M Compiler]] will be considered.
Line 19: Line 19:
* The only types are BYTE and ADDRESS - unsigned 8 and 16 bit integers.
* The only types are BYTE and ADDRESS - unsigned 8 and 16 bit integers.
* Identifiers cannot contain underscores - the PL/M compiler treats them as spaces - dollar signs can appear but are ignored.
* Identifiers cannot contain underscores - the PL/M compiler treats them as spaces - dollar signs can appear but are ignored.
* Keywords are reserved in PL/M.
<br><br>
<br><br>
PL/I features of interest:
PL/I features of interest:
Line 29: Line 30:
* PL/I has a range of types, none of which are called BYTE or ADDRESS.
* PL/I has a range of types, none of which are called BYTE or ADDRESS.
* Identifiers can contain underscores and some implementations allow dollar signs.
* Identifiers can contain underscores and some implementations allow dollar signs.
* Keywords are not reserved in PL/I.


===Implementation===
===Implementation===