Re: OK what does ` mean - seriously seems to be not documented.
- Posted by DerekParnell (admin) May 07, 2014
- 2840 views
Derek,
Well say you have a string like:
.."crlf" = `\r\n`..- this is a very contrived example but ..
The idea is you would read in lines like this and using value() or a user-defined function put them into key-value pairs.
In this particular case you should end up with a key which refers to the regex \r\n.
It would be nice to also be able to refer to the binary value \r\n but the \r is stripped.
It would be a major inconvenience to have to parse the string to get this functionality.
It seems perfectly reasonable that someone (given the functionality of value() may want to be able to read in multi-line strings and raw byte-strings.
Of course it is a slippery slope.
Why are you using the value() function. It has a specific purpose, namely to convert text representation of Euphoria Objects into actual Euphoria objects.
If you want to create key-value pairs from a text file that contains lines like this ...
"crlf" = `\r\n`then have a look at the function keyvalues in the std/text.e library.
Or if you wish to map these key-value pairs, consider the function new_from_string in the std/map.e library.