Re: OK what does ` mean - seriously seems to be not documented.

new topic     » goto parent     » topic index » view thread      » older message » newer message
gimlet said...

I guess knowing that `...` was a raw string would have made my question superfluous.

However reading the manual doesn't give me what I want exactly.

My question is what are raw strings used for, what limitations are placed on the etc. I am asking this as I want to know whether they need to be accounted for when reading and writing from a file.

The wikipedia entry says they are a literal string format (which seems to imply that they fully the equivalent of quoted strings). It certainly would seem odd to write raw strings to file on Windows as the carriage returns normally present would appear to be missing.

I believe that raw strings (unlike normal quoted strings, created in Euphoria with the double quotes) can span multiple lines. In addition, using backslash as an escape character isn't allowed. A lot of characters that'd normally have to be escaped don't need to be escaped in Euphoria's raw string format, but the flip side (limitation) is that you can't escape anything - thus there's no way to represent the backquote itself inside of a backquote-generated raw string.

(That's why we have two raw string specifiers, the backquote and the triple doublequote format. If that's still not good enough, you can split the raw string into two raw strings and concatenate a normal string in between them.)

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu