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 Function, Chr$ Function, InStr Function, Left$ Function, Len Function, LSet$ Function, Mid$ Function, Right$ Function, RSet$ Function, Str$ Function, Val Function

Space$ Function Example

> Print "XYZ" + Space$(1) + "ABC"
XYZ ABC

> Print Space$(3) + "ABC"
   ABC
>