[chuck-users] Windows, drives, and Machine.add
Roger Critchlow
rec at elf.org
Fri Oct 15 12:14:26 EDT 2010
The source code in chuck-1.2.1.3 that processes the argument to Machine.add
is expecting to parse a filename and optional arguments using colons to
separate the filename and arguments, but it also looks like it's trying to
allow \: to escape a colon.
On Fri, Oct 15, 2010 at 10:05 AM, Rebecca Fiebrink
<fiebrink at princeton.edu>wrote:
>
>> Have any ChucK windows users figured out how to accomplish Machine.add
>> with a fully-qualified path name that includes the drive letter?
>>
>> Machine.add("C:/Users/rebecca/tmp.ck") results in error
>> "[C]: no such file or directory"
>
>
That happens because the colon is treated the separator between the file
name and an argument.
and Machine.add("C\:/Users/rebecca/tmp.ck") results in error
>> [tmp2.ck]:line(2): unrecognized escape sequence '\:'
>>
>>
That happens, most probably, because the Chuck parser is attempting to
translate escape sequences into characters, long before even constructing
the call to Machine.add().
Try
Machine.add("C\\:/Users/rebecca/tmp.ck")
that will let the escape sequence parse parse \\ into \, and then the
argument parser will see \: and leave your filename alone.
-- rec --
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20101015/e2c28fb1/attachment.html>
More information about the chuck-users
mailing list