[chuck-users] escaped backslash in string

Joel Matthys jwmatthys at yahoo.com
Fri Mar 8 15:56:14 EST 2013

OK, I solved it. This fails:

"\\hello" => xmit.addString;

but this works:

"\\hello" => string foo;
foo => xmit.addString;

I guess the addString method doesn't have fully recognize escape characters?


On 03/08/2013 03:44 PM, Joel Matthys wrote:
> Hi all. I'm working on a project that requires me to send a backslash 
> character via OSC.
> This construct is typical of C family languages:
> "\\hello"  -------> prints: \hello
> but ChucK doesn't seem to let me escape a backslash. Instead I get 
> [unrecognized escape sequence: '\h'].
> Same when I try to use octal: "\134hello"
> Setting aside the crazy fact that I have to send a backslash over OSC 
> (it's for Guido music notation in InScore), does anyone know how to 
> get a backslash in a ChucK string?
> Thanks,
> Joel
> _______________________________________________
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20130308/d2b1954e/attachment.html>

More information about the chuck-users mailing list