The following example declares the simple variable A to be a monitor element. When A is used, monitoring information on A is written to file FYLE.
MONITOR FYLE (A)
In the following program, simple variable I, array MON1, subscripted variable MON2[1], and label FINISH are monitored.
100 BEGIN 200 300 FILE TERMOUT(KIND=REMOTE); 400 INTEGER I; 500 LABEL FINISH; 600 ARRAY MON1[0:3], 700 MON2[0:3]; 800 MONITOR TERMOUT (I,MON1,MON2[1],FINISH); 900 1000 I := 27; 1100 MON1[0] := I; 1200 MON2[0] := 23; 1300 MON2[1] := MON1[0] * 2; 1400 GO TO FINISH; 1500 FINISH: 1600 END.
When the program is executed, the following output is written to the terminal:
0148 @ 003:000E:4 (00001000) I =0:=27 (4"00000000001B") 0148 @ 003:0013:4 (00001100) MON1 [0]=0:=27 (4"00000000001B") 0148 @ 003:0020:4 (00001300) MON2 [1]=0:=54 (4"000000000036") 0148 @ 003:0024:4 (00001500) LABEL FINISH

