Category:Polyglot:PL/I and PL/M: Difference between revisions
Content added Content deleted
(→PL/I and PL/M: Notes on arrays) |
(→Include Files: Additional definitions) |
||
Line 130: | Line 130: | ||
return ( mod( a, b ) ); |
return ( mod( a, b ) ); |
||
end modf; |
end modf; |
||
/* returns not p */ |
|||
not: procedure( p )returns( bit( 1 ) ); |
|||
declare p bit( 1 ); |
|||
return( ^ p ); |
|||
end not; |
|||
toupper: procedure( c )returns( character( 1 ) ); |
toupper: procedure( c )returns( character( 1 ) ); |
||
Line 140: | Line 146: | ||
For PL/M, the following definitions would be used, with the appropiate subset cut-and-pasted into the programL |
For PL/M, the following definitions would be used, with the appropiate subset cut-and-pasted into the programL |
||
<lang pli> |
|||
⚫ | |||
DECLARE |
DECLARE BINARY LITERALLY 'ADDRESS', CHARACTER LITERALLY 'BYTE'; |
||
DECLARE FIXED LITERALLY ' ', |
DECLARE FIXED LITERALLY ' ', BIT LITERALLY 'BYTE'; |
||
DECLARE STATIC LITERALLY ' '; |
DECLARE STATIC LITERALLY ' ', RETURNS LITERALLY ' '; |
||
DECLARE |
DECLARE FALSE LITERALLY '0', TRUE LITERALLY '1'; |
||
⚫ | |||
BDOSF: PROCEDURE( FN, ARG )BYTE; |
BDOSF: PROCEDURE( FN, ARG )BYTE; |
||
DECLARE FN BYTE, ARG ADDRESS; GOTO 5; END; |
DECLARE FN BYTE, ARG ADDRESS; GOTO 5; END; |