ack/lang/a68s/liba68s/structscope.p
1988-10-04 13:41:01 +00:00

30 lines
868 B
OpenEdge ABL

50000 #include "rundecs.h"
50010 (* COPYRIGHT 1983 C.H.LINDSEY, UNIVERSITY OF MANCHESTER *)
50020 (**)
50030 (**)
50040 FUNCTION STRUCTSCOPE(STRUCTPTR: UNDRESSP; TEMPLATE: DPOINT):DEPTHRANGE;
50050 VAR TEMPOS, STRUCTPOS: INTEGER;
50060 NEWEST: DEPTHRANGE;
50070 PTR: UNDRESSP;
50080 BEGIN
50090 NEWEST := 0;
50100 TEMPOS := 1;
50110 STRUCTPOS := TEMPLATE^[1];
50120 WHILE STRUCTPOS>=0 DO
50130 BEGIN
50140 PTR := INCPTR(STRUCTPTR, STRUCTPOS);
50150 WITH PTR^.FIRSTPTR^ DO
50160 IF NEWEST<OSCOPE THEN NEWEST := OSCOPE;
50170 TEMPOS := TEMPOS+1;
50180 STRUCTPOS := TEMPLATE^[TEMPOS]
50190 END;
50200 STRUCTSCOPE := NEWEST
50210 END;
50220 (**)
50230 (**)
50240 (*-02() BEGIN END ; ()-02*)
50250 (*+01()
50260 BEGIN (*OF MAIN PROGRAM*)
50270 END (*OF EVERYTHING*).
50280 ()+01*)