•
String arrays and numeric arrays are essentially the same, however there are slight
differences
in
treatment by SuperBASIC The last dimension at a string array defines
the maXimum length of the strings within the
array.
String variables can be any length
up
to
32766 Both string arrays and string variables can be sliced.
String lengths on either side
of
a string assignment need not be equal.
If
the sizes are
not the same then either the right hand string
IS
truncated
to
fit
or the length of the left
hand string
IS
reduced
to
match.
If
an assignment
IS
made
to
a sliced string then
if
necessary the 'hole' defined
by
the slice
will
be padded with spaces.
It
IS
not necessary
to
specify the
final
dimension of a strrng
array.
Not specifying the
dimension selects the whole
strrng
while specifying a single element
will
pick out a single
character and specifying a slice
will
define a sub strrng.
string
arrays
string
variable~
Unlike many BASICs SuperBASIC does not treat strrng arrays
as
fixed length strings.
comment
If
the data stored
in
a strrng array
is
less than the maximum size of the strrng array then
the length of the
strrng
IS
reduced.
ASSigning
data
to
a sliced string array or sfrrng varrable may not have the desired effect.
ASSignments made
In
this
way
will
not update the length of the string and
so
It
is
possible
that the
system
will
not recognise the assignment. The length at a string array or a string
varrable
IS
only updated when
an
assignment
IS
made
to
the whole string.
•
•
Command
FILL$
LEN$
12/24
Function
generate a string
find the length of a string
warning
FOR SERVICE MANUALS
CONTACT:
MAURITRON
TECHNICAL
SERVICES
www.mauritron.co.uk
TEL:
01844.351694
FAX:
01844.352554
51