basic.matbuild
Converts dimensioned array to dynamic array.
Syntax
matbuild dynamic.array.variable from array.variable{,start {,end}} using delimiter -or- dynamic.array.variable = array.variable
Description
converts a dimensioned array into a dynamic array.
'dynamic.array.variable' is the variable constructed from all or part of a dimensioned array.
'array.variable' references the dimensioned array.
'start' is an integer expression which indicates the optional starting position within the array to begin parsing. If omitted, it defaults to 1 (one). The value of 'start' must be numeric.
'end' is an integer expression which indicates the optional ending position within the array to stop parsing. If omitted, it defaults to the array size previously declared with a 'dim' statement for the given array. The value of 'end' must also be numeric.
'delimiter' is the optional delimiting character within the string to be used to separate data parsed from the array. If omitted, the default delimiter is an attribute mark (char(254)). The 'delimiter' may be any character between x'00' and x'fe'.
Example
dim a(10)
for x = 1 to 10
a(x) = x
next x
matbuild xyz from a,4,9 using char(253)
print xyz
4]5]6]7]8]9
dim a(4)
a(1) = 'larry'
a(2) = 'moe'
a(3) = 'curly'
a(4) = ''
stooges = a
print stooges
larry^moe^curly
Note that because the final element of the dimensioned array is null, it is not
appended to the dynamic array.
See Also
User Comments
What do you think?
Share your experience or ask a question by using the form below.
Login to leave your comments.
