ref: 7635a2fc747e19cde64aea96f6c0f71ffec25a5a
parent: 6889334521a973fa304d82778b7532300ed5512b
author: ISSOtm <[email protected]>
date: Mon Mar 23 11:35:46 EDT 2020
Reword and give an example of symbol interpolation
--- a/src/asm/rgbasm.5
+++ b/src/asm/rgbasm.5
@@ -240,11 +240,19 @@
A funky feature is
.Ql {symbol}
within a string.
-This will examine the type of the symbol and insert its value accordingly.
-If symbol is a string symbol, the symbols value is simply copied.
-If it's a numeric symbol, the value is converted to hexadecimal notation with a dollar sign
+This will paste
+.Ar symbol Ap s
+contents as a string.
+If it's a string symbol, the string is simply inserted.
+If it's a numeric symbol, its value is converted to hexadecimal notation with a dollar sign
.Sq $
prepended.
+.Bd -literal -offset indent
+TOPIC equs "life, the universe, and everything"
+ANSWER = 42
+;\ Prints "The answer to life, the universe, and everything is $2A"
+PRINTT "The answer to {TOPIC} is {ANSWER}\[rs]n"
+.Ed
.Pp
It's possible to change the way numeric symbols are converted by specifying a print type like so:
.Ql {d:symbol} .