ref: 9faa5c7a9e17fb112d8a2d2156cc82070c8053d1
parent: 6fbb25c0dae9d755ef5eeb1326472de46811df77
author: ISSOtm <[email protected]>
date: Thu Sep 5 11:40:54 EDT 2019
Update docs on char escapes in macro args Fixes #415
--- a/src/asm/rgbasm.5
+++ b/src/asm/rgbasm.5
@@ -583,8 +583,7 @@
.Ic SHIFT .
.Pp
Line continuations work as usual inside macros or lists of arguments of macros.
-Strings, however, are a bit trickier.
-The following example shows how to use strings as arguments for a macro:
+However, some characters need to be escaped, as in the following example:
.Pp
.Bd -literal -offset indent
PrintMacro : MACRO
@@ -591,8 +590,8 @@
PRINTT \[rs]1
ENDM
- PrintMacro STRCAT(\[rs]"Hello\[rs]"\[rs], \[rs]
- \[rs]" world\[rs]\[rs]n\[rs]")
+ PrintMacro STRCAT("Hello"\[rs], \[rs]
+ " world\[rs]\[rs]n")
.Ed
.Pp
.Ic SHIFT