SPACES Function
Replaces numeric values in the elements of a dynamic array with blank spaces.
Syntax
SPACES(dynArray)
Syntax Elements
dynArray A DataBasic expression that evaluates to a dynamic array.
Return Value
A dynamic array with the same structure as dynArray, but with each integer element replaced by that number of blank spaces.
-
Decimal fractions are invalid; they are treated as 0 and a run-time error is generated.
-
Non-numeric elements are treated as 0 and a run-time error is generated (see Strings in Arithmetic Expressions).
Example
ARY = 2:@VM:"5":@VM:3.9:@AM:"":@VM:@VM:"Status Quo" NEWARY = SPACES(ARY)
Sets NEWARY to " VM
VM
AM VM
VM
".
-
Element 3 is not an integer, so a run-time error occurs. No spaces are generated for this element.
-
The three non-numeric elements each produce run-time error B16. No spaces are generated for these elements.