mirror of
https://github.com/gbdev/rgbds.git
synced 2026-10-03 10:45:37 +00:00
Line continuations *do* work inside strings
The rgbasm.5(5) documentation was outdated here
This commit is contained in:
1 parent
a67f5d6e01
commit
1b5648bb06
3 files changed
+3
-9
No files matched your search
+2
-9
@@ -66,15 +66,8 @@ To do so, put a backslash at the end of the line:
|
||||
DB 1, 2, 3,\ \[rs]
|
||||
4, 5, 6,\ \[rs]\ ;\ Put it before any comments
|
||||
7, 8, 9
|
||||
.Ed
|
||||
.Pp
|
||||
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!")
|
||||
DB "Hello,\ \[rs]\ \ ;\ Space before the \[rs] is included
|
||||
world!"\ \ \ \ \ \ \ \ \ \ \ ;\ Any leading space is included
|
||||
.Ed
|
||||
.Sh EXPRESSIONS
|
||||
An expression can be composed of many things.
|
||||
|
||||
Whitespace-only changes.
@@ -0,0 +1 @@
|
||||
Line continuations work!
|
||||
Reference in new issue
Block a user