perm filename R5.SAI[S,AIL]2 blob sn#101442 filedate 1974-05-14 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00002 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	BEGIN "R5"
C00004 ENDMK
C⊗;
BEGIN "R5"
INTEGER I,J;
REQUIRE 25 NEW_ITEMS;

RECORD_CLASS FOO(REAL A,B,C);

RECORD_POINTER (FOO) ARRAY BAZ[1:10];
RECORD_POINTER (FOO) ITEMVAR FI;
RECORD_POINTER (FOO) ITEMVAR ARRAY FA[1:2];

RECORD_CLASS FOO2(INTEGER ARRAY AA);
RECORD_POINTER(FOO2) XX;
LABEL L1,L2,L3,L4;

L1:
BAZ[1]←NEW_RECORD(FOO);

FOO:A[BAZ[1]]←1.0;
I←1;
FOO:B[BAZ[1]]←2*FOO:A[BAZ[I]];

L2:
BEGIN
INTEGER ARRAY AAA[1:4];
FOR I←1 STEP 1 UNTIL 4 DO AAA[I]←I;
MEMORY[LOCATION(FOO2:AA[XX←NEW_RECORD(FOO2)])]↔MEMORY[LOCATION(AAA)];
END;

L3:FOO2:AA[XX][3]←3;
FOR I←1 STEP 1 UNTIL 4 DO OUTSTR(CVS(FOO2:AA[XX][I])&" ");
L4:
FI ← NEW(NEW_RECORD(FOO));
BAZ[1]←DATUM(FI);
FA[1]←FI;
BAZ[2]←DATUM(FA[1]);

END;

END;