D - BUG?
- Julio César Carrascal Urquijo (12/12) Oct 04 2003 According to documentation the following should work:
-
Walter
(4/13)
Oct 04 2003
You can't have a " in an r"string". Write it as: "
- Helmut Leitner (14/33) Oct 04 2003 Would it be a problem to allow
- Christian Kaiser (11/44) Oct 05 2003 May I cite the manual:
- Julio César Carrascal Urquijo (2/4) Oct 05 2003 That's right. I was so tired last night. Don't know what was I thinking.
According to documentation the following should work: void main() { char[] data = r"<p align="center">someText</p>"; } but fails with: test.d(3): semicolon expected, not 'center' test.d(3): found '>someText</p>' when expecting ';' I'm using DMD 0.73 on Windows -- Julio César Carrascal Urquijo http://www.artelogico.com/
Oct 04 2003
"Julio César Carrascal Urquijo" <adnoctum phreaker.net> wrote in message news:blnrue$24t4$1 digitaldaemon.com...According to documentation the following should work: void main() { char[] data = r"<p align="center">someText</p>"; } but fails with: test.d(3): semicolon expected, not 'center' test.d(3): found '>someText</p>' when expecting ';' I'm using DMD 0.73 on WindowsYou can't have a " in an r"string". Write it as: "<p align=\"center\">someText</p>";
Oct 04 2003
Walter wrote:"Julio César Carrascal Urquijo" <adnoctum phreaker.net> wrote in message news:blnrue$24t4$1 digitaldaemon.com...Would it be a problem to allow r'...............' in addition to the existing r"..............." as alternative syntax for wysiwig strings? Using it the example became: char[] data = r'<p align="center">someText</p>'; It's not only good for HTML, but also be a blessing for SQL programming, consider: cmd=r'SELECT .... WHERE customer="ThisName" ....;' -- Helmut Leitner leitner hls.via.at Graz, Austria www.hls-software.comAccording to documentation the following should work: void main() { char[] data = r"<p align="center">someText</p>"; } but fails with: test.d(3): semicolon expected, not 'center' test.d(3): found '>someText</p>' when expecting ';' I'm using DMD 0.73 on WindowsYou can't have a " in an r"string". Write it as: "<p align=\"center\">someText</p>";
Oct 04 2003
May I cite the manual: An alternate form of wysiwyg strings are enclosed by backquotes, the ` character. The ` character is not available on some keyboards and the font rendering of it is sometimes indistinguishable from the regular ' character. Since, however, the ` is rarely used, it is useful to delineate strings with " in them. `hello` `c:\root\foo.exe` `ab\n` string is 4 characters, 'a', 'b', '\', 'n' Christian"Helmut Leitner" <helmut.leitner chello.at> wrote in message news:3F7FC110.9ABEE8D1 chello.at...Walter wrote:"Julio César Carrascal Urquijo" <adnoctum phreaker.net> wrote in message news:blnrue$24t4$1 digitaldaemon.com...Would it be a problem to allow r'...............' in addition to the existing r"..............." as alternative syntax for wysiwig strings? Using it the example became: char[] data = r'<p align="center">someText</p>'; It's not only good for HTML, but also be a blessing for SQL programming, consider: cmd=r'SELECT .... WHERE customer="ThisName" ....;' -- Helmut Leitner leitner hls.via.at Graz, Austria www.hls-software.comAccording to documentation the following should work: void main() { char[] data = r"<p align="center">someText</p>"; } but fails with: test.d(3): semicolon expected, not 'center' test.d(3): found '>someText</p>' when expecting ';' I'm using DMD 0.73 on WindowsYou can't have a " in an r"string". Write it as: "<p align=\"center\">someText</p>";
Oct 05 2003
You can't have a " in an r"string". Write it as: "<p align=\"center\">someText</p>";That's right. I was so tired last night. Don't know what was I thinking. I'm sorry.
Oct 05 2003