Is there a way to print a backslash to the console?
post(""); results in nothing (escape character), but post("\"); unexpectedly prints two backslashes, I thought the first one would would escape the second one.
m
For the archive:
post("\u005C"); post("\x5C");
also produce \ instead of \
verbatim string escaping like post(@""");
don't compile (error: stray ‘@’ in program)
m.
On 18.05.2018 16:25, Max wrote:
Is there a way to print a backslash to the console?
post(""); results in nothing (escape character), but post("\"); unexpectedly prints two backslashes, I thought the first one would would escape the second one.
m
Pd-dev mailing list Pd-dev@lists.iem.at https://lists.puredata.info/listinfo/pd-dev
On 2018-05-23 12:30, Max wrote:
For the archive:
post("\u005C"); post("\x5C");
also produce \ instead of \
sure. all of these and post("\"); produce the same ASCII character 92, which is double-escaped by Pd to produce the literal r'\' (double backslash).
verbatim string escaping like post(@""");
don't compile (error: stray ‘@’ in program)
because this is C# syntax, not C (or C++).
but again: your problem is not how to enter the backslash, but to print it (which is controlled by Pd, which will escape your backslash). see it as a bug if you want to (although it's really just that backslashes are *unsupported* by Pd).
if you can live with a similar glyph, try "\u29f5" or "\u29f9" (non of which will give you a *real* backslash, but something that looks somewhat similar)
famsd IOhannes
Hi Max,
To summarise what IOhannes says: no, unfortunately you can't print a backslash to the console; it's not supported.
Cheers Damian -- damian stewart . digital generalist . vienna, austria http://damianstewart.com . twitter @damian0815