<br><br><div class="gmail_quote">On Sat, Aug 21, 2010 at 00:00, div0 <span dir="ltr"><<a href="mailto:div0@sourceforge.net">div0@sourceforge.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 20/08/2010 21:16, Jonathan M Davis wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
It's legal according to TDPL. It seems to be intended to be used as a shorthand<br>
for if. So, stuff like<br>
<br>
condition&& writeln("my output");<br>
<br>
are supposed to be perfectly legal as bizarre as that may seem. I don't believe<br>
that it would be legal to do<br>
<br>
if(condition&& writeln("my output"))<br>
{<br>
}<br>
<br>
since the result fed to if must be a bool, but a statement doesn't need to<br>
result in bool, so apparently you can use&& with a void function in a<br>
statement. It's just that the void function must be last.<br>
<br>
- Jonathan M Davis<br>
</blockquote>
<br></div>
Then Andrei has taken leave of his senses and this is one situation where DMD is corrent and TDPL is wrong.<br>
<br>
Half arsed, moronic shortcuts like that belong in scripting languages and shell environements, not serious programming languages.</blockquote><div><br></div><div>If Andrei is wrond and DMD is right, then the first example should not have compiled too..</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div class="h5">
-- <br>
My enormous talent is exceeded only by my outrageous laziness.<br>
<a href="http://www.ssTk.co.uk" target="_blank">http://www.ssTk.co.uk</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Ersin Er<div><a href="http://metasolid.com" target="_blank">http://metasolid.com</a></div><br>