Re: write multiple lines without "\n" with writeln

2014-11-21 Thread Adam D. Ruppe via Digitalmars-d-learn
On Friday, 21 November 2014 at 17:43:27 UTC, Ary Borenszweig wrote: What's concatenation by juxtaposition? When "foo" "bar" turns into "foobar". The two string literals are right next to each other, no operator or anything else in between, so they are combined.

Re: write multiple lines without "\n" with writeln

2014-11-21 Thread Ary Borenszweig via Digitalmars-d-learn
On 11/21/14, 2:46 PM, Adam D. Ruppe wrote: On Friday, 21 November 2014 at 17:43:27 UTC, Ary Borenszweig wrote: What's concatenation by juxtaposition? When "foo" "bar" turns into "foobar". The two string literals are right next to each other, no operator or anything else in between, so they are

Re: write multiple lines without "\n" with writeln

2014-11-21 Thread Ary Borenszweig via Digitalmars-d-learn
On 11/21/14, 1:59 PM, "Marc Schütz" " wrote: On Friday, 21 November 2014 at 15:00:31 UTC, ketmar via Digitalmars-d-learn wrote: On Thu, 20 Nov 2014 14:23:23 -0300 Ary Borenszweig via Digitalmars-d-learn wrote: This way you avoid silly typing mistakes while at the same time you allow splitting

Re: write multiple lines without "\n" with writeln

2014-11-21 Thread via Digitalmars-d-learn
On Friday, 21 November 2014 at 15:00:31 UTC, ketmar via Digitalmars-d-learn wrote: On Thu, 20 Nov 2014 14:23:23 -0300 Ary Borenszweig via Digitalmars-d-learn wrote: This way you avoid silly typing mistakes while at the same time you allow splitting a string across several lines without having

Re: write multiple lines without "\n" with writeln

2014-11-21 Thread ketmar via Digitalmars-d-learn
On Thu, 20 Nov 2014 14:23:23 -0300 Ary Borenszweig via Digitalmars-d-learn wrote: > This way you avoid silly typing mistakes while at the same time you > allow splitting a string across several lines without having to > concatenate them at runtime. i bet that current D frontend is able to conca

Re: write multiple lines without "\n" with writeln

2014-11-20 Thread Ary Borenszweig via Digitalmars-d-learn
On 11/20/14, 9:05 AM, uri wrote: On Thursday, 20 November 2014 at 10:41:24 UTC, bearophile wrote: uri: It's by design And it's a nice handy design. Bye, bearophile For Wysiwyg strings I agree that it's great but I prefer C/C++/Python like behaviour for double quoted strings. I guess it's

Re: write multiple lines without "\n" with writeln

2014-11-20 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 20 November 2014 at 11:08:24 UTC, Suliman wrote: writeln( "first string" "second" ~ "string" ); I expect: first string second" string" There's no quoted newline there. You could do: writeln( "first string second string"); with the newlines

Re: write multiple lines without "\n" with writeln

2014-11-20 Thread uri via Digitalmars-d-learn
On Thursday, 20 November 2014 at 10:41:24 UTC, bearophile wrote: uri: It's by design And it's a nice handy design. Bye, bearophile For Wysiwyg strings I agree that it's great but I prefer C/C++/Python like behaviour for double quoted strings. I guess it's what I'm used to :) Cheers,

Re: write multiple lines without "\n" with writeln

2014-11-20 Thread bearophile via Digitalmars-d-learn
Suliman: I understand it. I expect what concatenation symbol will stay new line in new line and not append it's to current: writeln( "first string" "second" ~ "string" ); I expect: first string second" string" but not: first stringsecondstring If

Re: write multiple lines without "\n" with writeln

2014-11-20 Thread Suliman via Digitalmars-d-learn
I understand it. I expect what concatenation symbol will stay new line in new line and not append it's to current: writeln( "first string" "second" ~ "string" ); I expect: first string second" string" but not: first stringsecondstring

Re: write multiple lines without "\n" with writeln

2014-11-20 Thread bearophile via Digitalmars-d-learn
uri: It's by design And it's a nice handy design. Bye, bearophile

Re: write multiple lines without "\n" with writeln

2014-11-20 Thread uri via Digitalmars-d-learn
On Thursday, 20 November 2014 at 08:28:11 UTC, Suliman wrote: In dco source code I have found: void ShowUsage() { writeln(" dco build tool " ~ strVersion ~ " written by FrankLIKE. Usage: dco [] for example: dco or: dco app.d build for dfl2: dco } I do not see here any "\n". Why this code

write multiple lines without "\n" with writeln

2014-11-20 Thread Suliman via Digitalmars-d-learn
In dco source code I have found: void ShowUsage() { writeln(" dco build tool " ~ strVersion ~ " written by FrankLIKE. Usage: dco [] for example: dco or: dco app.d build for dfl2: dco } I do not see here any "\n". Why this code is output all one by line, and not in single line? Why my co