Space: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
''This function is for BASIC compatibility. It is not available in pure JavaScript projects.'' | |||
Space(''number'') | Space(''number'') | ||
Line 5: | Line 7: | ||
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 (Basic) == | ||
<pre> | <pre> | ||
Line 15: | Line 17: | ||
Letter = Left(Spaces, i) & CHR(65 + i) | Letter = Left(Spaces, i) & CHR(65 + i) | ||
Print Letter | Print Letter | ||
Next | |||
</pre> | </pre> | ||
Line 32: | Line 35: | ||
[[Category:Language Reference]] | [[Category:Language Reference]] | ||
[[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