mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Line continuations *do* work inside strings
The rgbasm.5(5) documentation was outdated here
This commit is contained in:
@@ -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.
|
||||
|
||||
0
test/asm/line-continuation-string.err
Normal file
0
test/asm/line-continuation-string.err
Normal file
1
test/asm/line-continuation-string.out
Normal file
1
test/asm/line-continuation-string.out
Normal file
@@ -0,0 +1 @@
|
||||
Line continuations work!
|
||||
Reference in New Issue
Block a user