413
DIM( ) Function
Generate String/Get Array Size
Formats
Where:
array_name[$] Name of a previously dimensioned array.
fill$
Text string or value which will be used to fill the variable up to the
length specified. String expression.
len
Desired length of the string variable. Numeric expression, integer.
stmtref
Program line number or label to transfer control to.
subscript
Array's dimensions (first, second, or third).
Returns
Initialized string, or information about dimensions of array.
Description
Use the DIM( ) function to generate or initialize a string. You can also use it to obtain
information about the size of an array you have already defined using the DIM
directive.
Format 1: Generate or Initialize String
DIM(len[,fill$][,ERR=stmtref])
Use this format to generate or initialize a string whose length you specify. The
function fills the string by using the value for fill$.
Note: This format of the function behaves almost like the DIM directive's format to
initialize strings. However, instead of repeating only the first character of the string,
as in the directive, the function repeats the complete value of the fill string. (Refer to
If you omit the fill string, ProvideX uses spaces as fill characters; e.g.,
0100 PRINT ":",DIM(11,"*Cat"),":"
->RUN
*Cat*Cat*Ca: