[Swift-devel] how to comment out brackets

skenny at uchicago.edu skenny at uchicago.edu
Tue Feb 9 20:32:28 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. "}").

that did it, thanks! double open-bracket gets it thru (yeah, i
had tried not escaping it at all and needless to say it
produced an error as well). 





More information about the Swift-devel mailing list