Hi,
The following code compiles and outputs 1 = 1 as expected:
1 == 1 writeln(1 = 1);
However, the following code fails to compile (although it should not):
1 == 2 writeln(1 = 2);
The error is as follows:
Error: integral constant must be scalar type, not void
What I expect that the second
On Friday, August 20, 2010 13:06:11 div0 wrote:
On 20/08/2010 20:59, Ersin Er wrote:
Hi,
The following code compiles and outputs 1 = 1 as expected:
1 == 1 writeln(1 = 1);
However, the following code fails to compile (although it should not):
1 == 2 writeln(1 = 2);
The
== Quote from Ersin Er (ersin...@gmail.com)'s article
Hi,
The following code compiles and outputs 1 = 1 as expected:
1 == 1 writeln(1 = 1);
However, the following code fails to compile (although it should not):
1 == 2 writeln(1 = 2);
The error is as follows:
Error: integral constant must
On 20/08/2010 21:16, Jonathan M Davis wrote:
It's legal according to TDPL. It seems to be intended to be used as a shorthand
for if. So, stuff like
condition writeln(my output);
are supposed to be perfectly legal as bizarre as that may seem. I don't believe
that it would be legal to do
On Friday, August 20, 2010 14:00:22 div0 wrote:
Then Andrei has taken leave of his senses and this is one situation
where DMD is corrent and TDPL is wrong.
Half arsed, moronic shortcuts like that belong in scripting languages
and shell environements, not serious programming languages.
Well,
On Sat, Aug 21, 2010 at 00:00, div0 d...@sourceforge.net wrote:
On 20/08/2010 21:16, Jonathan M Davis wrote:
It's legal according to TDPL. It seems to be intended to be used as a
shorthand
for if. So, stuff like
condition writeln(my output);
are supposed to be perfectly legal as
On Fri, Aug 20, 2010 at 23:06, div0 d...@sourceforge.net wrote:
On 20/08/2010 20:59, Ersin Er wrote:
Hi,
The following code compiles and outputs 1 = 1 as expected:
1 == 1 writeln(1 = 1);
However, the following code fails to compile (although it should not):
1 == 2 writeln(1 = 2);
Jonathan M Davis:
Well, Andrei is definitely a fan of using D for small scripts, so arguments
that
something shouldn't be done because it's intended for scripting aren't going
to
fly with him. Personally, I find it a bit weird, but I don't really care. I
probably won't code that way,
On Friday, August 20, 2010 15:32:16 bearophile wrote:
Jonathan M Davis:
Well, Andrei is definitely a fan of using D for small scripts, so
arguments that something shouldn't be done because it's intended for
scripting aren't going to fly with him. Personally, I find it a bit
weird, but I