perm filename R3.SAI[S,AIL] blob sn#097040 filedate 1974-04-18 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00002 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	BEGIN "R3"
C00004 ENDMK
C⊗;
BEGIN "R3"
REQUIRE "ABBREV.SAI[S,RHT]" SOURCE_FILE;

RECORD_CLASS PXF(RECORD_POINTER(PXF) FRAME;REAL TH,PH,OM,X,Y,Z);
REAL XXX;

RECORD_POINTER(PXF) PROCEDURE NEW_PXF(RECORD_POINTER(PXF) FRAME;
						REAL TH,PH,OM,X,Y,Z);
	BEGIN
	RECORD_POINTER(PXF) F;
	F←NEW_RECORD(PXF);
	PXF:FRAME[F]←FRAME;
	PXF:TH[F]←TH;
	PXF:PH[F]←PH;
	PXF:OM[F]←OM;
	PXF:X[F]←X;
	PXF:Y[F]←Y;
	PXF:Z[F]←Z;
	RETURN(F);
	END;

PROCEDURE SETQ(REFERENCE RECORD_POINTER(ANY_CLASS) F1;RECORD_POINTER(ANY_CLASS) F2);
	F1←F2;

PROCEDURE FADD(REFERENCE REAL X,Y,Z);X←Y+Z;

EXTERNAL RECORD_CLASS FOO(REAL X,Y,Z);

RECORD_POINTER (PXF) F1,F2,F3;
RECORD_POINTER (ANY_CLASS) A1;
RECORD_POINTER (PXF,FOO) PF;
LABEL L1,L2,L3,L4;

L1:
A1←NULL_RECORD;
F1←NULL_RECORD;
PF←F1;
F3←F3;
PF←PF←NEW_RECORD(FOO);
F2←NEW_RECORD(FOO); ! SHOULD BE A BUG;
XXX←PXF:X[NEW_RECORD(FOO)];
A1←PF;
F2←A1;
F1←PF;

L2: FOO:X[PF]←π;

F1←NEW_PXF(NULL_RECORD,π/2,π,π,3,3,1);
F2←NEW_PXF(F1,PXF:TH[F1]/2,3*π/2,0,PXF:X[F1]+2,PXF:Y[F1],PXF:Z[F1]);

L3:
PXF:Z[F1]←PXF:Y[F2]+(XXX←(PXF:Y[F1]←4*PXF:X[F1]+PXF:X[F2]));

L4:
SETQ(A1,PXF:FRAME[F1]);
SETQ(PXF:FRAME[F3],A1);
FADD(PXF:X[F1],PXF:X[F1],PXF:X[F2←NEW_RECORD(PXF)]);

END