Apple (programming language): Difference between revisions

Content deleted Content added
Undid revision 1232947264 by 2600:6C67:28F0:8C40:140B:ED52:506A:4008 (talk) unexplained deletion
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 &lt;identifier&gt; LITERALLY [ (&lt;parameter-list&gt; ) ] &lt;character-constant&gt; ;
 
If &lt;parameter-list&gt; is not specified the compiler replaces all occurrences of &lt;identifier&gt; yhroughout the program with &lt;character-constant&gt;.If &lt;paramter-list&gt; 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==