Content deleted Content added
Peter Flass (talk | contribs) Undid revision 1232947264 by 2600:6C67:28F0:8C40:140B:ED52:506A:4008 (talk) unexplained deletion |
Peter Flass (talk | contribs) →Other features: literally |
||
Line 43:
==Other features==
An <code>OFFSET</code> variable identifies the relative location of a based variable in the containing file. A <code>DESCRIPTOR</code> variable resembles a pointer variable, but also contains the length of the associated based variable in addition to its address.▼
The <code>LOCK</code> statement puts a program into "locked status", where all asynchronous events will be queued. A corresponding <code>UNLOCK</code> statement puts the program in "unlocked status", capable of processing asynchronous events. All queued events will be processed.▼
===Hardware access===
The <code>REGISTER</code> storage class and the <code>INLINE</code> builtin subroutine allow access to STAR hardware features.
Line 52 ⟶ 57:
CALL INLINE("F8", 5, 0, SOURCE, 0, "20", 0, TARGET);
===Text replacement===
▲An <code>OFFSET</code> variable identifies the relative location of a based variable in the containing file. A <code>DESCRIPTOR</code> variable resembles a pointer variable, but also contains the length of the associated based variable in addition to its address.
The <code>LITERALLY</code> specification allows the programmer to specify replacement text to be substituted at compile time. The syntax is:
%DECLARE <identifier> LITERALLY [ (<parameter-list> ) ] <character-constant> ;
If <parameter-list> is not specified the compiler replaces all occurrences of <identifier> yhroughout the program with <character-constant>.If <paramter-list> is specified, the replacement character string is formed by replacing all occurrences of the parameter name, treated as a string, with the corresponding argument.
▲The <code>LOCK</code> statement puts a program into "locked status", where all asynchronous events will be queued. A corresponding <code>UNLOCK</code> statement puts the program in "unlocked status", capable of processing asynchronous events. All queued events will be processed.
Example:
%DECLARE BITS LITERALLY(A1,A2) 'A1*A2*64';
I = BITS(J,B);
will generate the statement:
I=J*8*64;
==Omitted PL/I features==
|