Contact us Heritage collections Image license terms
HOME ACL Associates Technology Literature Applications Society Software revisited
Further reading □ OverviewNo.1No.2No.3No.4No.5No.6No.7No.8No.9No.10No.11No.12No.13No.14No.15No.16No.17No.18No.19No.20No.21No.22No.23No.24No.25No.26No.27No.28No.29No.30No.31No.33No.34
ACD C&A INF CCD CISD Archives Contact us Heritage archives Image license terms

Search

   
ACLLiteratureProgress ReportsSPROGS Notes
ACLLiteratureProgress ReportsSPROGS Notes
ACL ACD C&A INF CCD CISD Archives
Further reading

Overview
No.1
No.2
No.3
No.4
No.5
No.6
No.7
No.8
No.9
No.10
No.11
No.12
No.13
No.14
No.15
No.16
No.17
No.18
No.19
No.20
No.21
No.22
No.23
No.24
No.25
No.26
No.27
No.28
No.29
No.30
No.31
No.33
No.34

SPROGS Note No 11: Some useful display routines

W D Shaw, J R Gallop

27 October 1972

1. End of file condition

To remove the necessity of placing a marker word at the end of null files it is suggested that a length of file function, LNFL, be created. Thus:

(a) 
      LOAD ('P1', ANAME( 'FILENAME')) 
      LOAD ('P2',1.0) 
      LOAD ('P3',1.0) 
      LNFL ('LEN','P1','P2') 
      
      WHILE('P3','LE','LEN') 
           BEGINS 
           LOAD ('X',AR('P1','P2','P3')) 
           ADD('P3','1.0) 
           LOAD ('Y',AR('P1','P2','P3')) 
           ADD ('P3',1.0) 
           SETXY('X''Y') 
           ADUFLM
           ENDS 

2. Execute command

The above example could be simplified by the addition of an execute command, XCT. The loop becomes:

(b) 
      LOAD('NOARGS',2.0) 
      NULLSET(DSRTNM('SETXY')) 
      WHILE('P3',LE,LEN) 
           BEGINS 
           XCT(P1,P2,P3) 
           ADD ('P3',PR2(NOARGS)) 
           ADUFLM 
           ENDS 

XCT takes an array of index variable as its argument. It causes the NULLSET instruction to be executed with the arguments pointed to by the array. Thus, it is really a primitive form of DRAW on a NULL file. Another command XCTA (execute and add) would XCT then increment the third member of the array by the number of arguments in the command specified by NULLSET. Thus (b) becomes

(c) 
      NULLSET (DSRTN:' SETXY')) 
      WHILE('PS',LE,LEN) 
      BEGINS 
      XCTA('P1','P2','P3') 
      ADUFLM 
      ENDS 

Thus, XCTA causes a 'SETXY' on each pair of arguments in the NULL file and increments P3 by 2.

⇑ Top of page
© Chilton Computing and UKRI Science and Technology Facilities Council webmaster@chilton-computing.org.uk
Our thanks to UKRI Science and Technology Facilities Council for hosting this site