1. Back quotes for raw/literal strings
- Posted by Terry Constant <EUforum at terryconstant.com> Aug 16, 2004
- 507 views
I cannot find where Euphoria has raw/literal/non-escaped strings. If I missed the info, could someone point me in the correct direction? If not, what is the chance of having back quotes, "`", delimit raw/non-escaped strings. For example, `c:\Program Files\myfile.txt` would be the same as "c:\\Program Files\\myfile.txt" or `He said, "Hello" to her.` would be the same as "He said, \"Hello\" to her." Again, if this topic has been discussed or is documented, could someone point me to it? Terry Constant
2. Re: Back quotes for raw/literal strings
- Posted by don cole <doncole at pacbell.net> Aug 17, 2004
- 478 views
Terry Constant wrote: > > I cannot find where Euphoria has raw/literal/non-escaped strings. > If I missed the info, could someone point me in the correct direction? > If not, what is the chance of having back quotes, "`", delimit > raw/non-escaped strings. > > For example, `c:\Program Files\myfile.txt` would be > the same as "c:\\Program Files\\myfile.txt" or > `He said, "Hello" to her.` would be > the same as "He said, \"Hello\" to her." > > Again, if this topic has been discussed or is documented, could someone > point me to it? > > Terry Constant > I may not know what your are talking about. However I belived it is discussed in the regular help file for Euphoria under printf (also see puts). doncole SF
3. Re: Back quotes for raw/literal strings
- Posted by Chris Burch <chriscrylex at aol.com> Aug 17, 2004
- 483 views
don cole wrote: > > Terry Constant wrote: > > > > I cannot find where Euphoria has raw/literal/non-escaped strings. > > If I missed the info, could someone point me in the correct direction? > > If not, what is the chance of having back quotes, "`", delimit > > raw/non-escaped strings. > > > > For example, `c:\Program Files\myfile.txt` would be > > the same as "c:\\Program Files\\myfile.txt" or > > `He said, "Hello" to her.` would be > > the same as "He said, \"Hello\" to her." > > > > Again, if this topic has been discussed or is documented, could someone > > point me to it? > > > > Terry Constant > > > > I may not know what your are talking about. > However I belived it is discussed in the > regular help file for Euphoria under printf (also see puts). > > doncole > SF > Hi in euphoria " " delimits a string, and ' ' delimits a character (' ' delimits a string in delphi or pascal though) so "This is a string of text\n" is a string of text with a newline character at the end and '\n' is just the newline character Chris
4. Re: Back quotes for raw/literal strings
- Posted by Derek Parnell <ddparnell at bigpond.com> Aug 17, 2004
- 479 views
Terry Constant wrote: > > I cannot find where Euphoria has raw/literal/non-escaped strings. > If I missed the info, could someone point me in the correct direction? > If not, what is the chance of having back quotes, "`", delimit > raw/non-escaped strings. > > For example, `c:\Program Files\myfile.txt` would be > the same as "c:\\Program Files\\myfile.txt" or > `He said, "Hello" to her.` would be > the same as "He said, \"Hello\" to her." > > Again, if this topic has been discussed or is documented, could someone > point me to it? I'm sorry to report that Euphoria does not have such a facility. I know some languages do have a way of representing literal strings that do not need 'escaped' characters, but Euphoria only has one string literal syntax. All string literals must be enclosed in double-quote characters, must not cross over line boundries, and any embedded double-quotes and newline characters must be 'escaped' - \" and \n respectively. Thus the back-slash character must also be escaped - \\. -- Derek Parnell Melbourne, Australia
5. Re: Back quotes for raw/literal strings
- Posted by Tommy Carlier <tommy.carlier at pandora.be> Aug 17, 2004
- 482 views
Derek Parnell wrote: > I'm sorry to report that Euphoria does not have such a facility. I know > some languages do have a way of representing literal strings that do > not need 'escaped' characters, but Euphoria only has one string literal > syntax. All string literals must be enclosed in double-quote characters, > must not cross over line boundries, and any embedded double-quotes > and newline characters must be 'escaped' - \" and \n respectively. Thus > the back-slash character must also be escaped - \\. In C#, you put an @ in front of your string for unescaping strings: a = "c:\\euphoria\\"; b = @"c:\euphoria\"; -- tommy online: http://users.telenet.be/tommycarlier Euphoria Message Board: http://uboard.proboards32.com
6. Re: Back quotes for raw/literal strings
- Posted by Derek Parnell <ddparnell at bigpond.com> Aug 17, 2004
- 482 views
Tommy Carlier wrote: > > Derek Parnell wrote: > > I'm sorry to report that Euphoria does not have such a facility. I know > > some languages do have a way of representing literal strings that do > > not need 'escaped' characters, but Euphoria only has one string literal > > syntax. All string literals must be enclosed in double-quote characters, > > must not cross over line boundries, and any embedded double-quotes > > and newline characters must be 'escaped' - \" and \n respectively. Thus > > the back-slash character must also be escaped - \\. > > In C#, you put an @ in front of your string for unescaping strings: > a = "c:\\euphoria\\"; > b = @"c:\euphoria\"; > And in D, you have two ways ... a = r"c:\euphoria\"; b = `c:\euphoria\`; But these are not Euphoria are they? -- Derek Parnell Melbourne, Australia