Space$ Function
Returns a string of the specified number of single-byte spaces.
Syntax
Space$(count)
Parameters
- count
- Specify the number of spaces to be returned.
Return Values
A string of the specified number of single-byte spaces
Description
Space$ returns a string of the specified number of single-byte spaces. Space$ returns up to 255 single-byte spaces (within the allowable range defined for the string variable).
The Space$ instruction is normally used to insert spaces before, after, or between characters of another string.
See Also
Asc, Chr$, InStr, Left$, Len, LSet$, Mid$, Right$, RSet$, Str$, Val
Space$ Function Example
> Print "XYZ" + Space$(1) + "ABC"
XYZ ABC
> Print Space$(3) + "ABC"
ABC
>