TAL Programmer's Guide
Using Read-Only Arrays
Using Arrays
096254 Tandem Computers Incorporated 7–25
A procedure located in the upper 32K-word area of the code segment can access global
STRING read-only arrays located in the lower 32K-word area only by using extended
pointers. Here is an example:
PROC q (sp, len);
STRING .EXT sp;
INT len;
BEGIN
!Code to print sp[0:len - 1]
END;
PROC p;
BEGIN
STRING s = 'P' := "Hello";
STRING .EXT sp := $XADR(s);
LITERAL LEN = 5;
CALL q (sp, len);
END;
A procedure can pass the data of a read-only array only by reference to a procedure
located in the same code segment.
You can copy data from a read-only array into a user data segment array as follows:
STRING message = 'P' := ["** LOAD MAG TAPE #00144"];
STRING .array[0:22];
array ':=' message FOR 23;