Thread overview | ||||||
---|---|---|---|---|---|---|
|
January 07, 2006 Is the supposed to work? | ||||
---|---|---|---|---|
| ||||
import std.stdio; void main() { writef(\\\n); } |
January 07, 2006 Re: Is the supposed to work? | ||||
---|---|---|---|---|
| ||||
Posted in reply to BCS | 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 |
January 12, 2006 Re: Is the supposed to work? | ||||
---|---|---|---|---|
| ||||
Posted in reply to BCS | 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." |
January 21, 2006 Re: Is the supposed to work? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bruno Medeiros | Bruno Medeiros <daiphoenixNO@SPAMlycos.com> wrote: >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? > Yeah I thought it was some kind of bug with DDoc. lol. -S. -- Email works. |
Copyright © 1999-2021 by the D Language Foundation