Many of the operations performed by POINTER statements require the use of temporary storage for intermediate results. In describing the actions of a POINTER statement, a discussion of how this temporary storage is initialized, changed, and disposed of is necessary. These discussions use the following names for these temporary storage locations:
-
Stack-source-pointer
-
Stack-destination-pointer
-
Stack-auxiliary-pointer
-
Stack-integer-counter
-
Stack-test-character
-
Stack-source-operand
The prefix, stack, denotes that none of these parameters correspond to any program variables. They exist only until execution of the POINTER statement is completed.
The stack-source-pointer, the stack-destination-pointer, and the stack-auxiliary-pointer have the same internal structure as a pointer variable that can be declared in a program. These temporary storage locations are initialized either from pointer expressions in the pointer statement or from previous corresponding temporary storage locations.
Stack-Source-Pointer
The initial value of the stack-source-pointer points to the first source character to be used by the associated operation. As the execution of the instruction progresses, the stack-source-pointer is modified to point to each successive source character. When the operation is complete, the stack-source-pointer points to the first unprocessed character in the source data (the process is determined by the particular form of the POINTER statement). This final value can be stored into a pointer variable, or it can be discarded.
Stack-Destination-Pointer
The initial value of the stack-destination-pointer points to the first destination character position to be used by the associated operation. As the execution of the operation progresses, the stack-destination-pointer is modified to point to each successive destination character position. When the operation is complete, the stack-destination-pointer points to the first unfilled character position in the destination. If more than one source is to be processed, the stack-destination-pointer value corresponding to the completed processing of one element in the source list is used as the initial value for the subsequent source. If no more sources are to be processed, this final value can be stored into a pointer variable, or it can be discarded.
Stack-Auxiliary-Pointer
The initial value of the stack-auxiliary-pointer points to the first entry in a table of data to be used by the operation in its execution. This table can be a translate table if the operation to be performed is extracting characters from the source data, translating the characters to different characters (possibly containing a different number of bits per character), and storing the translated characters in the destination. This table can be a truth set describing a particular set of characters if the operation to be performed requires a membership test. Finally, this table can be a picture: a table that contains instructions of a special type describing how the source data is to be edited before being stored in the destination.
Stack-Integer-Counter
The stack-integer-counter, when required by a POINTER statement, is initialized by an arithmetic expression supplied in the POINTER statement. The value of this arithmetic expression is integerized before it is used. The stack-integer-counter has different meanings depending on the type of POINTER statement involved. In some cases, the number of characters in a source string to be processed is dictated solely by this parameter. The number of numeric characters to be placed in the destination while converting the value of an arithmetic expression to character form is also dictated by the stack-integer-counter.
In some forms of the POINTER statement, two controlling factors exist that dictate how many characters are to be processed from a source string. One factor depends on the source data and is called a condition. The other factor is a maximum count contained in the stack-integer-counter and is provided by an arithmetic expression in the POINTER statement. For example, with such a POINTER statement, the following instructions could be written: Translate characters from the source string to the destination until either 14 characters have been transferred or a period is encountered in the source string, whichever comes first. The final value of the stack-integer-counter is available for storage, or it is discarded.
Stack-Test-Character
The stack-test-character is initialized by an arithmetic expression usually, but not necessarily, of the form of a single-character string, such as B. Although the stack-test-character parameter is one entire word of memory that contains the single-precision value of the arithmetic expression, only the rightmost character position of the word is used. When a condition employing a relational operator is used in a POINTER statement, the stack-test-character must contain the character against which the individual characters in the source string are to be compared.
Stack-Source-Operand
The stack-source-operand is used when the source data is given by the value of an arithmetic expression rather than a value located in an array row into which the stack-source-pointer points. The stack-source-operand is initialized by the arithmetic expression.

