Category:Polyglot:PL/I and PL/M: Difference between revisions
m
→Include Files: typo
(→Include Files: Additional definitions) |
m (→Include Files: typo) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 64:
A suitable file for PL/I definitions could be:
<br>
<
%replace true by '1'b, false by '0'b;
Line 143:
/* end pg.inc */</
For PL/M, the following definitions would be used, with the appropiate subset cut-and-pasted into the
<
DECLARE BINARY LITERALLY 'ADDRESS', CHARACTER LITERALLY 'BYTE';
DECLARE FIXED LITERALLY ' ', BIT LITERALLY 'BYTE';
Line 192:
DECLARE ( A, B )ADDRESS;
RETURN( A MOD B );
END MODF;
MIN: PROCEDURE( A, B ) ADDRESS;
DECLARE ( A, B ) ADDRESS;
IF A < B THEN RETURN( A ); ELSE RETURN( B );
END MIN;
MAX: PROCEDURE( A, B ) ADDRESS;
DECLARE ( A, B ) ADDRESS;
IF A > B THEN RETURN( A ); ELSE RETURN( B );
END MAX;</syntaxhighlight>
Note the lack of comments in the PL/M "include" file - this is because the definitions will be commented out for PL/I compilers by having a "/*" starting in column 81 preceeding the definitions and /* */ follow them.
|