<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Thanks, but this doesn't work: ChucK parses this OK but then fails to find the file.</div><div><br></div><div>Machine.add("/Users/rebecca/tmp.ck") works fine.</div><div><br></div><div>Machine.add("C\\:/Users/rebecca/tmp.ck") produces</div><div>[tmp.ck] no such file or directory</div><div><br></div><div>(And re: previous posts, thanks, but Windows does handle forward-slash-style path names fine, without any need for escape characters. Hence the forward slashes in my strings. Escaped "\\" produces same results. Should've mentioned that before.)</div><div><br></div><div>Has anyone actually gotten this to work in practice?</div><div><br></div><div><pre>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
<<a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users">fiebrink at princeton.edu</a>>wrote:
><i>
</i>>><i> Have any ChucK windows users figured out how to accomplish Machine.add
</i>>><i> with a fully-qualified path name that includes the drive letter?
</i>>><i>
</i>>><i> Machine.add("C:/Users/rebecca/tmp.ck") results in error
</i>>><i> "[C]: no such file or directory"
</i>><i>
</i>><i>
</i>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
>><i> [tmp2.ck]:line(2): unrecognized escape sequence '\:'
</i>>><i>
</i>>><i>
</i>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 --
</pre><div><br></div></div></body></html>