The Full BASIC standard demands that the beam of PLOT LINES shall be off when some other graphics commands such as PLOT POINTS or PLOT TEXT has been executed. This behavior is inconvenient in most cases.
The module described in lines 1000 or later enables plotting connected lines with no influence of any other graphics command.
Any program unit that uses this module must include a DECLARE EXTERNAL line as in line 100, PLOT LINES: x, y; should be replaced with CALL PlotTo(x,y), and PLOT LINES without coordinates should be replaced with CALL BeamOff. SET LINE COLOR and SET LINE STYLE are still valid.
100 DECLARE EXTERNAL SUB LINES.PlotTo, LINES.BeamOff 110 DATA 1, 0.6 120 DATA 2, 1.1 130 DATA 3, 3.2 140 DATA 4, 2.1 150 SET WINDOW 0,5,0,5 160 SET LINE STYLE 3 170 DO 180 READ IF MISSING THEN EXIT DO:x,y 190 CALL PlotTo(x,y) 200 PLOT POINTS: x,y 210 LOOP 220 END 1000 MODULE LINES 1010 PUBLIC SUB PlotTo, BeamOff 1020 SHARE NUMERIC x0,y0,beam 1030 LET beam=0 1040 EXTERNAL SUB PlotTo(x,y) 1050 IF beam<>0 THEN PLOT LINES:x0,y0; x,y 1060 LET x0=x 1070 LET y0=y 1080 LET beam=1 1090 END SUB 1100 EXTERNAL SUB BeamOff 1110 LET beam=0 1120 END SUB 1130 END MODULE
Note.
If you do not need to make a conformed program, use an originally enhanced command SET BEAM MODE "IMMORTAL" .
On version 7.8.7 (or later), the initial beam is set to "IMMORTAL". When you need conformed environment, choose OPTION Compatibility menu, and turn the initial beam mode to "RIGOROUS".