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'...")
 
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
SPACE(''number'')
''This function is for BASIC compatibility. It is not available in pure JavaScript projects.''  


'''Description'''
Space(''number'')


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


'''Example'''
Space returns a string consisting of a number of spaces. The required argument, ''number'', is any valid numeric expression.
 
== Example (Basic) ==


<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
Next
</pre>
</pre>


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


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


'''Related Items'''
== Related Items ==
 
[[string|String]]
 
[[Category:Language Reference]]


[[string|STRING]]
[[Category:BASIC Functions]]

Latest revision as of 15:35, 25 March 2019

This function is for BASIC compatibility. It is not available in pure JavaScript projects.

Space(number)

Description

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

Example (Basic)

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
Next

Output

A
 B
  C
   D
    E

Related Items

String