158. Multiple windows ~~~~~~~~~~~~~~~~ It is possible to give the illusion that there are several independent text windows defined on the screen simultaneously. As soon as you define a new text window, the previous one is 'forgotten'. However, as long as the program 'remembers' where the cursor was, the same window can be redefined later, and the cursor put back in its original position. The short demonstration program below displays two independently scrolling windows on the screen. VDU31,x,y is equivalent to PRINTTAB(x,y); and the term IFSGNRND=1THEN is used to make the two windows scroll at different, varying rates. Omit this term, leaving just VDURND(95)+31 to see what I mean. 100 p1%=0:v1%=0:p2%=0:v2%=0:MODE7:VDU23,1,0;0;0;0; 110 REPEAT:PROCwindow1:PROCvdu:PROCwindow2:PROCvdu:UNTILFALSE 120 : 1000 DEFPROCwindow1:p2%=POS:v2%=VPOS 1010 VDU28,0,11,18,0:VDU31,p1%,v1%:ENDPROC 1020 : 1030 DEFPROCwindow2:p1%=POS:v1%=VPOS 1040 VDU28,21,24,39,13:VDU31,p2%,v2%:ENDPROC 1050 : 1060 DEFPROCvdu:IFSGNRND=1THENVDURND(95)+31 1070 ENDPROC