Description

Generates a string value containing a specified number of blank spaces. Use Space to provide a particular number of spaces between any two strings.

Syntax

string = Space(expression)

Parameters

The Space function has the following parameters.

ParametersDescription
expressionMust be a numeric value.

If the expression evaluates to less than 0 (zero), the results are the same as 0.

See also

Str()

Example

* give_me is given a string value containing 12 blank spaces.
blanks = 12
give_me = Space(blanks)
 
/* Assigns the concatenated string to the variable identifier N. This would read "^^^^JANE^^^^E.^^^^DOE" (the ^ represents blank spaces). */
S = Space(4)
L = "DOE"
M = "E."
F = "JANE"
N = S:F:S:M:S:L
 
/* Each of the elements of the array TABLE is assigned a string value containing 10 blank spaces. */
Dim TABLE(12)
Mat TABLE = Space(10)
  • No labels