Document that symbol interpolation works outside of strings too

This commit is contained in:
Rangi
2022-09-22 01:15:17 -04:00
parent 0794da22bc
commit f5b1990604

View File

@@ -71,13 +71,11 @@ To do so, put a backslash at the end of the line:
world!"\ \ \ \ \ \ \ \ \ \ \ ;\ Any leading space is included world!"\ \ \ \ \ \ \ \ \ \ \ ;\ Any leading space is included
.Ed .Ed
.Ss Symbol interpolation .Ss Symbol interpolation
A funky feature is A funky feature is writing a symbol between
.Ql {symbol} .Ql {braces} ,
within a string, called called
.Dq symbol interpolation . .Dq symbol interpolation .
This will paste the contents of This will paste the symbol's contents as if they were part of the source file.
.Ql symbol
as if they were part of the source file.
If it is a string symbol, its characters are simply inserted as-is. If it is a string symbol, its characters are simply inserted as-is.
If it is a numeric symbol, its value is converted to hexadecimal notation with a dollar sign If it is a numeric symbol, its value is converted to hexadecimal notation with a dollar sign
.Sq $ .Sq $