mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-21 02:32:06 +00:00
@@ -583,16 +583,15 @@ If you want to use the rest, you need to use the keyword
|
|||||||
.Ic SHIFT .
|
.Ic SHIFT .
|
||||||
.Pp
|
.Pp
|
||||||
Line continuations work as usual inside macros or lists of arguments of macros.
|
Line continuations work as usual inside macros or lists of arguments of macros.
|
||||||
Strings, however, are a bit trickier.
|
However, some characters need to be escaped, as in the following example:
|
||||||
The following example shows how to use strings as arguments for a macro:
|
|
||||||
.Pp
|
.Pp
|
||||||
.Bd -literal -offset indent
|
.Bd -literal -offset indent
|
||||||
PrintMacro : MACRO
|
PrintMacro : MACRO
|
||||||
PRINTT \[rs]1
|
PRINTT \[rs]1
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
PrintMacro STRCAT(\[rs]"Hello\[rs]"\[rs], \[rs]
|
PrintMacro STRCAT("Hello"\[rs], \[rs]
|
||||||
\[rs]" world\[rs]\[rs]n\[rs]")
|
" world\[rs]\[rs]n")
|
||||||
.Ed
|
.Ed
|
||||||
.Pp
|
.Pp
|
||||||
.Ic SHIFT
|
.Ic SHIFT
|
||||||
|
|||||||
Reference in New Issue
Block a user