[Swift-devel] how to comment out brackets

Mihael Hategan hategan at mcs.anl.gov
Tue Feb 9 19:31:05 CST 2010


On Tue, 2010-02-09 at 18:13 -0600, skenny at uchicago.edu wrote:
> does anyone know if there's a way i can comment out a bracket
> in a swift string?
> 
> for example something like this:
> 
> string cmdstr = "\{";
> trace(cmdstr);
> 
> produces:
> 
> Could not compile SwiftScript source: line 15:27: unexpected
> char: '{'
> 
> not sure if it's a bug or i'm just missing something really
> simple here :)

You shouldn't need to escape them (and the swift parser probably
complains because it doesn't recognize the escape sequence), but I have
a suspicion you're sending this email because you had a problem, and I
suspect that problem is that the swift compiler passes brackets
unescaped to karajan, in which the bracket means something.

If that's the case, try "{{" to generate one bracket. You don't need to
escape the closing bracket (i.e. "}").




More information about the Swift-devel mailing list