Scor­pio News

  

January–March 1987 – Volume 1. Issue 1











Page 18 of 63











Field descriptors can be mixed in a format statement Lf a particular mode of I/O is required. Thus {fa record such ae a batch identifier and number, followed by various parameters iy to be read or weitten, the associated Format’ statement could Look Tike thie:

FORMAT(AG,2X,13,2%,3F6 3)

This looks complicated but means that «4 Letter batch identifier and 3 digit batch number are followed by detaile of 3 parameters expressed ag floating point numbers, the batch i/d and serial numbers are separates by 2 spaces ae ace the Serial umber and parameters The output would appear as?

“vor 32323.34517.27011.535

This looks a bit messy and the parameters should be spaced out; this can be done simply by amending pare of the format description to include spaces:

edther – (4.2K, 3,2K,76.3,2%,P6.3,2%,76.3) which works but ie untidy or = (AM, 2K, 13,3(28,76.39)

which also works but is better programming practic!

The effect of the change ts as follows: “yor 12323. 34549. 270-21. 555

The overall effect 4s to carry out the reading or printing of 3 sets of similar

Combined fields and it should ‘be noted that combinations of Field descriptors

sed in thir way should be enclosed in round brackets.

CONTROL, STATEMENTS

1d are of ten types (some of which are

ide the flow of the progra i to heir BASIC equivalence)

Th i

1.6070 2 IF 3, STOR, A. ASSIGN 5. DO S. CONTINUE 7.CaLL 8 PAUSE 9. RETURN 10” END

0 70 statements

These may be unconditional (e c GOTO 100 which transfers control ta another part of the program just as in BASIC), computed (e.g. GOTO (80,90,100,123) K, Where K is an integer variable auch that {Khas a value of 3, chen control is passed tothe statement label which is third in the list – inthis case, 100]. Note that if the value of K is 0 or greater than the nunber of statemene numbers inthe List (4 in this case), then control passes to the next logical statement in the progeam sequence

‘Assigned O70 statements are not often weed and the ASSION

statemene Label(s)

Be declared before they are used in thie way – thusy ASSIGN 100 TO MILK – ensures that {n an assigned GOTO of the form Goro milk J control is only passed to statement number 100

More than one ASSIGN statement can be used #0 that ifs

ASSION 212 TO MILK – che next assigned GOTO which mentions the variable MILK will Look like:

Goto MILK, (100,222) – and control vill be passed to whichever statement humber corresponds with the current value of the variable MILK


This is an OCR’d version of the scanned page and likely contains recognition errors.











Page 18 of 63