From 9faa5c7a9e17fb112d8a2d2156cc82070c8053d1 Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Thu, 5 Sep 2019 15:40:54 +0200 Subject: [PATCH] Update docs on char escapes in macro args Fixes #415 --- src/asm/rgbasm.5 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/asm/rgbasm.5 b/src/asm/rgbasm.5 index 5fd5b3fe..014bcb1f 100644 --- a/src/asm/rgbasm.5 +++ b/src/asm/rgbasm.5 @@ -583,16 +583,15 @@ If you want to use the rest, you need to use the keyword .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 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