Re: What are delimited string, heredoc and D token strings?

2010-06-28 Thread Pierre Rouleau
On 27/06/10 1:03 PM, bearophile wrote: Pierre Rouleau: In what sense? This is valid D1 code: import std.stdio; void main() { string s = this is just a test; writefln(s); } Bye, bearophile Thanks! -- Pierre

What are delimited string, heredoc and D token strings?

2010-06-27 Thread Pierre Rouleau
Hi all, The D2.0 lexical page describes delimited string and token string literals. Is there any example of how these are used and why, somewhere? Thanks -- Pierre

Re: What are delimited string, heredoc and D token strings?

2010-06-27 Thread Simen kjaeraas
Pierre Rouleau prouleau...@gmail.com wrote: Hi all, The D2.0 lexical page describes delimited string and token string literals. Is there any example of how these are used and why, somewhere? Token strings are added for the specific use case of string mixins[1]. They must contain valid D

Re: What are delimited string, heredoc and D token strings?

2010-06-27 Thread Pierre Rouleau
On 27/06/10 9:52 AM, Simen kjaeraas wrote: Pierre Rouleau prouleau...@gmail.com wrote: Hi all, The D2.0 lexical page describes delimited string and token string literals. Is there any example of how these are used and why, somewhere? Token strings are added for the specific use case of

Re: What are delimited string, heredoc and D token strings?

2010-06-27 Thread bearophile
Pierre Rouleau: I was wondering if D had the equivalnt of Python's triple quote string literals and it does: the delimited string serves the same purpose. Great! But keep in mind that normal D string literals can span more than one line :-) Bye, bearophile

Re: What are delimited string, heredoc and D token strings?

2010-06-27 Thread Pierre Rouleau
On 27/06/10 11:36 AM, bearophile wrote: But keep in mind that normal D string literals can span more than one line :-) In what sense? In the sense that adjacent strings are concatenated? If I want to create a string literal that embeds new line without explicitly placing a '\n' inside the