We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 63d9b63 commit a2fee11Copy full SHA for a2fee11
_build/reference/796-string-space.markdown
@@ -1,16 +1,23 @@
1
# SPACE
2
3
-> SPACE (n)
+> s = SPACE (n)
4
5
-Returns a string of n spaces.
+Returns a string of `n` spaces.
6
7
+### Example 1:
8
-~~~
9
+```
10
+print "A" + space(5) + "B" ' Output: A B
11
12
13
+### Example 2: Insert string into a buffer
14
+
15
16
' s is a string ("" or longer); l is length of buffer (0+);
17
Def lset(s, l) = Left(s + Space(l), l) ' left justify text
18
Def rset(s, l) = Right(Space(l) + s, l) ' right justify text
19
Const buffer = 10 ' length of buffer
20
21
While True Do
22
Color 7, 0: Cls
23
Print "[ Using a buffer of "; buffer; " spaces ]"
@@ -25,7 +32,4 @@ While True Do
25
32
Color 0, 7: Print rset(text, buffer);
26
33
Pause
27
34
Wend
28
-
29
30
31
35
0 commit comments