write multiple lines without "\n" with writeln
bearophile via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Nov 20 03:30:48 PST 2014
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 I compile and run this program:
void main() {
import std.stdio;
writeln(
"first string"
"second" ~
"string"
);
}
I see this output (and it's correct, as expected):
first stringsecondstring
Bye,
bearophile
More information about the Digitalmars-d-learn
mailing list