Space: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
(Created page with "SPACE(''number'') '''Description''' SPACE returns a string consisting of a number of spaces. The required argument, ''number'', is any valid numeric expression. '''Example'...")
 
No edit summary
Line 1: Line 1:
SPACE(''number'')
Space(''number'')


'''Description'''
== Description ==


SPACE returns a string consisting of a number of spaces. The required argument, ''number'', is any valid numeric expression.
Space returns a string consisting of a number of spaces. The required argument, ''number'', is any valid numeric expression.


'''Example'''
== Example ==


<pre>
<pre>
REM SPACE Example
Rem Space Example
'SPACE creates a string of spaces
'Space creates a string of spaces
DIM Spaces, Letter
Dim Spaces, Letter
Spaces = SPACE(4)
Spaces = Space(4)
FOR i = 0 to 4
For i = 0 to 4
   Letter = LEFT(Spaces, i) & CHR(65 + i)
   Letter = Left(Spaces, i) & CHR(65 + i)
   PRINT Letter
   Print Letter
</pre>
</pre>


'''Output'''
== Output ==


<pre>
<pre>
Line 27: Line 27:
</pre>
</pre>


'''Related Items'''
== Related Items ==


[[string|STRING]]
[[string|STRING]]
[[Category:Language Reference]]

Revision as of 03:20, 17 August 2012

Space(number)

Description

Space returns a string consisting of a number of spaces. The required argument, number, is any valid numeric expression.

Example

Rem Space Example
'Space creates a string of spaces
Dim Spaces, Letter
Spaces = Space(4)
For i = 0 to 4
  Letter = Left(Spaces, i) & CHR(65 + i)
  Print Letter

Output

A
 B
  C
   D
    E

Related Items

STRING