View Single Post
Old 04-21-2021, 10:34 AM   #74
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,471
Karma: 8025600
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Another thought: instead of newline() why not have character('name') where 'name' is the letter used in the escape? That lets us add more characters without risk of breaking things or needing to introduce more functions.

We could adapt names from the python standard escape sequence table.
Code:
\\ - backslash
\' - quote (')
\" - double_quote (")
\b - backspace
\n - newline (LF)
\r - return (CR)
\t - tab (TAB)
Examples:
Code:
character('newline') returns '\n'
character('return') returns '\r'
character('tab') returns '\t'
character('backspace') returns '\b'
character('backslash') returns '\\'
chaley is offline   Reply With Quote