Is there a way to create strings that are not parsed for \something characters? If not, are there objections to adding a way to do that? It can get to be a pain dealing with strings containing lots of " chars or when dealing with something like regexs where the \ char is used for escaping, so you have to double escape everything.
Adam
The problem you want to solve is copy and pasting strings into pike code?
On Thu, 8 Jun 2006 20:40:01 +0000 (UTC) "Martin Nilsson (Opera Mini - AFK!) @ Pike (-) developers forum" 10353@lyskom.lysator.liu.se wrote:
The problem you want to solve is copy and pasting strings into pike code?
Not really cutting and pasting, but just strings that are exactly what I typed, not parsed for \n and \t and \42 and \, etc, etc. Just like how single quotes vs double quotes work in perl.
"\n\\" is harder to read and write than '\n\', and it get worse as you get bigger and more complex regexps. And outputting html gets annoying too with all the ". I have no idea what we'd use for this though since single quotes are already taken.
Adam
On Fri, 9 Jun 2006 00:50:00 +0000 (UTC) "Martin Nilsson (Opera Mini - AFK!) @ Pike (-) developers forum" 10353@lyskom.lysator.liu.se wrote:
You can also use #"" and #string.
#"" still behaves the same as "", except that you can stick newlines in it. #string and Stdio.read_file() require you to put every string into its own seperate file, not exactly nicer or easier than all the slashes.
Adam
pike-devel@lists.lysator.liu.se