News for hackers. Stuff that matters.
Re:Notes on the M4 Macro Language (2008) by iamthad on Friday April 03, 2020 @01:21PM (#22771751)
It's not clear to me what you mean by "longstrings" from that page. Are you referring to the double-bracket quoted style?
Re:Notes on the M4 Macro Language (2008) by scythe on Friday April 03, 2020 @08:36PM (#22775206)
Yes. A Lua-style longstring is delimited by [===[ and ]===] where the number of = signs can be arbitrary (including zero); the end must have the same number of = signs as the beginning. Any string can be encoded inside of a longstring without escaping, simply by using long enough delimiters. There are a number of advantages to this notation: it's more readable (usually), it generally results in shorter code files, and longquoted substrings can be directly addressed without translation (though there may be other reasons not to pass that pointer around).