Line continuations *do* work inside strings

The rgbasm.5(5) documentation was outdated here
This commit is contained in:
Rangi
2021-07-01 17:56:49 -04:00
parent a67f5d6e01
commit 1b5648bb06
3 changed files with 3 additions and 9 deletions

View File

@@ -66,15 +66,8 @@ To do so, put a backslash at the end of the line:
DB 1, 2, 3,\ \[rs] DB 1, 2, 3,\ \[rs]
4, 5, 6,\ \[rs]\ ;\ Put it before any comments 4, 5, 6,\ \[rs]\ ;\ Put it before any comments
7, 8, 9 7, 8, 9
.Ed DB "Hello,\ \[rs]\ \ ;\ Space before the \[rs] is included
.Pp world!"\ \ \ \ \ \ \ \ \ \ \ ;\ Any leading space is included
This works anywhere in the code except inside of strings.
To split strings it is needed to use
.Fn STRCAT
like this:
.Bd -literal -offset indent
db STRCAT("Hello ",\ \[rs]
"world!")
.Ed .Ed
.Sh EXPRESSIONS .Sh EXPRESSIONS
An expression can be composed of many things. An expression can be composed of many things.

View File

View File

@@ -0,0 +1 @@
Line continuations work!