[PD-dev] backslash in Pd console

IOhannes m zmoelnig zmoelnig at iem.at
Wed May 23 13:50:59 CEST 2018


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20180523/83dd5aab/attachment-0001.sig>


More information about the Pd-dev mailing list