Skip to content

Commit 8f47fb4

Browse files
ISSOtmRangi42
andauthored
Improve some documentation (gbdev#1474)
* Delete removed symbol from PRINTLN examples * Touch up `SHIFT` docs Co-authored-by: Sylvie <[email protected]>
1 parent 8c96293 commit 8f47fb4

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

man/rgbasm.5

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1874,16 +1874,18 @@ then
18741874
will expand to
18751875
.Ql \e<42> .
18761876
.Pp
1877-
Another way to access more than nine macro arguments is the
1877+
The
18781878
.Ic SHIFT
1879-
command, a special command only available in macros.
1879+
directive is only available inside macros.
18801880
It will shift the arguments by one to the left, and decrease
18811881
.Dv _NARG
1882-
by 1.
1882+
by 1:
18831883
.Ic \e1
1884-
will get the value of
1885-
.Ic \e2 , \e2
1886-
will get the value of
1884+
takes the value of
1885+
.Ic \e2 ,
1886+
then
1887+
.Ic \e2
1888+
takes the value of
18871889
.Ic \e3 ,
18881890
and so forth.
18891891
.Pp
@@ -1892,9 +1894,9 @@ can optionally be given an integer parameter, and will apply the above shifting
18921894
A negative parameter will shift the arguments in reverse.
18931895
.Pp
18941896
.Ic SHIFT
1895-
is useful in
1897+
is especially useful in
18961898
.Ic REPT
1897-
blocks to repeat the same commands with multiple arguments.
1899+
loops, to repeat the same commands but with different arguments each time.
18981900
.Ss Printing things during assembly
18991901
The
19001902
.Ic PRINT
@@ -1907,7 +1909,6 @@ PRINT "Hello world!\en"
19071909
PRINTLN "Hello world!"
19081910
PRINT _NARG, " arguments\en"
19091911
PRINTLN "sum: ", 2+3, " product: ", 2*3
1910-
PRINTLN "Line #", __LINE__
19111912
PRINTLN STRFMT("E = %f", 2.718)
19121913
.Ed
19131914
.Bl -inset

0 commit comments

Comments
 (0)