digitalmars.D - Is the supposed to work?
- BCS (5/5) Jan 06 2006 import std.stdio;
- Chris Sauls (13/19) Jan 07 2006 Yes. Some quotes from http://digitalmars.com/d/lex.html :
- Bruno Medeiros (7/14) Jan 12 2006 Damn, this looks so unnatural. Is there any reason for escape sequences
- S. Chancellor (5/15) Jan 20 2006 Yeah I thought it was some kind of bug with DDoc. lol.
BCS wrote:import std.stdio; void main() { writef(\\\n); }Yes. Some quotes from http://digitalmars.com/d/lex.html : "A string literal is either a double quoted string, a wysiwyg quoted string, an escape sequence, or a hex string." "Adjacent escape strings are concatenated" "Adjacent strings are concatenated with the ~ operator, or by simple juxtaposition" So that code is supposed to be exactly the same as: import std.stdio; void main() { writef("\\\n"c); } -- Chris Sauls
Jan 07 2006
BCS wrote:import std.stdio; void main() { writef(\\\n); }Damn, this looks so unnatural. Is there any reason for escape sequences do be allowed out of quoted literals? -- Bruno Medeiros - CS/E student "Certain aspects of D are a pathway to many abilities some consider to be... unnatural."
Jan 12 2006
Bruno Medeiros <daiphoenixNO SPAMlycos.com> wrote:BCS wrote:Yeah I thought it was some kind of bug with DDoc. lol. -S. -- Email works.import std.stdio; void main() { writef(\\\n); }Damn, this looks so unnatural. Is there any reason for escape sequences do be allowed out of quoted literals?
Jan 20 2006