IBM 1130 User Manual page 569

Computing system
Hide thumbs Also See for 1130:
Table of Contents

Advertisement

Section
Subsections
Page
70
50
I
10
04
Avoid Arithmetic with Variables Having Constant
Subscripts
In the average arithmetic statement, a variable with
a constant subscript (TOTAL(10)) will require two
words more coding than an unsubscripted variable
(TOTDF). Such usage can always be avoided by an
EQUIVALENCE statement such as
EQUIVALENCE (TOTDF, TOTAL(10»
Then, rather than say
TOTAL(10)
=
TOTAL(10) + AMT
you would code
TOTDF
=
TaI'DF
+
AMT
and save two words.
In
a large program, the saving can be consider-
able. Furthermore, it makes the program more
readable, since TOTDF can be a more descriptive
name than TOTAL(10).
The data can be referred to by either name:
TOTDF when doing arithmetic
TOTAL(10) when you want it subscripted --
for example, when clearing an array of totals, when .
writing an array of totals on the disk, etc.

Advertisement

Table of Contents
loading

Table of Contents