File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -1874,16 +1874,18 @@ then
1874
1874
will expand to
1875
1875
.Ql \e <42> .
1876
1876
.Pp
1877
- Another way to access more than nine macro arguments is the
1877
+ The
1878
1878
.Ic SHIFT
1879
- command, a special command only available in macros.
1879
+ directive is only available inside macros.
1880
1880
It will shift the arguments by one to the left, and decrease
1881
1881
.Dv _NARG
1882
- by 1.
1882
+ by 1:
1883
1883
.Ic \e 1
1884
- will get the value of
1885
- .Ic \e 2 , \e 2
1886
- will get the value of
1884
+ takes the value of
1885
+ .Ic \e 2 ,
1886
+ then
1887
+ .Ic \e 2
1888
+ takes the value of
1887
1889
.Ic \e 3 ,
1888
1890
and so forth.
1889
1891
.Pp
@@ -1892,9 +1894,9 @@ can optionally be given an integer parameter, and will apply the above shifting
1892
1894
A negative parameter will shift the arguments in reverse.
1893
1895
.Pp
1894
1896
.Ic SHIFT
1895
- is useful in
1897
+ is especially useful in
1896
1898
.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 .
1898
1900
.Ss Printing things during assembly
1899
1901
The
1900
1902
.Ic PRINT
@@ -1907,7 +1909,6 @@ PRINT "Hello world!\en"
1907
1909
PRINTLN "Hello world!"
1908
1910
PRINT _NARG, " arguments\e n"
1909
1911
PRINTLN "sum: ", 2+3, " product: ", 2*3
1910
- PRINTLN "Line #", __LINE__
1911
1912
PRINTLN STRFMT("E = %f", 2.718)
1912
1913
.Ed
1913
1914
.Bl -inset
You can’t perform that action at this time.
0 commit comments