STORE QUOTE syntax for multi-line, literal strings
Created by: dvkt
This is a possible implementation for #12 (closed). Maybe people want to make HTML templates and stuff, well, now they can pretty easily using STORE QUOTE IN $str-var and END QUOTE syntax:
DATA:
content is text
PROCEDURE:
STORE QUOTE IN content
No strings attached! "This is a quote!" I said.
All the whitespace and whatnot comes, too.
\t\t Nothing is escaped. This \t is just \ and t.
Everything but the final newline. You've gotta add that, if you want it. ->
END QUOTE
display "Here's the quote: " crlf content crlf
Output:
Here's the quote:
No strings attached! "This is a quote!" I said.
All the whitespace and whatnot comes, too.
\t\t Nothing is escaped. This \t is just \ and t.
Everything but the final newline. You've gotta add that, if you want it. ->
Notes:
- Nothing is escaped.
- There is no final newline, but programs can add it with
crlfor somethin'. -
END QUOTEmust be alone on its own line.
Any ideas for better syntax? Or did you envision it as just expanding " to support multi-line strings? I thought about that, but was thinking it would be annoying to escape every ", but maybe it's nice because there's no new syntax.