Suppose that CSGN$="G30CB”. Then since the CALL$ Field is 8 Bytes long,
the effect of 180 is to produce a LEFT justified Field “G30CB “, i.e. 3
trailing spaces are added to ‘pad out’ the variable. It does not normally
matter whether the field is LEFT or RIGHT justified as long as the same
standard is used throughout the program. It is obviously essential to know how
the Field is justified. In some cases such as the Date Field, there will be no
padding and the length will be constant. Thus the Field DATE$ can often be
Much of the above discussion is correct only in respect of String data.
It is usually O.K. to store some types of numbers directly into strings and
such numbers can be retained in this way. e.g.
Numbers to be used in calculations may also be input in this way if
preferred. In fact it may be a good idea to input all data in string form as
this can mean easier and better Error trapping. Note that numbers stored in
this way will usually require more Disk space. Data stored in this way must
however be converted to Numeric form by use of the VAL function before any
calculations can be carried out.
The alternative way to store Numeric data still requires that it be
LSET or RSET. Before this can be done the number must be converted into String
form by the use of a special function. One of three possible choices must be
|= Make Integer Number into a 2 byte string.
|= Make Single Precision Number into 4 byte string.
|= Make Double Precision Number into 8 byte string.
And typical usage:
|Defines that all numeric variables from A-H are to be treated as
|Since BBAL$ is the Field for the Bank Balance, assumed single
Precision, a space of 4 bytes is set.
|The balance is entered as a number.
|The balance is made into a single precision string, and LSET
into the Field.