Thread overview
Bug? Please compile the code "DMD32 D Compiler v2.065"
Apr 14, 2014
sdvcn
Apr 14, 2014
Adam D. Ruppe
Apr 14, 2014
sdvcn
April 14, 2014
"DMD32 D Compiler v2.065
Copyright (c) 1999-2013 by Digital Mars written by Walter Bright
Documentation: http://dlang.org/"

code:


import std.stdio;

int main(string[] argv)
{
	bool  bh ;
	int ll;
	for(size_t n;n<99;n++)
	{
		int a= 5;
		int b = 5;

		auto r = (a != b);		// return r:false

		if(a != b)
		{
			ll = 55;
			bh = false;// Are executed at any time ??????????
			//i+=
			//break;
		}
	}

    writeln("ll:",ll);
	writeln("bh:",bh);
    return 0;
}

return :
ll:0
bh:false

April 14, 2014
On Monday, 14 April 2014 at 03:13:31 UTC, sdvcn wrote:
> 			bh = false;// Are executed at any time ??????????

That's never executed, but bh is automatically initialized to false when you declare it which is why you get bh:false at the end.
April 14, 2014
On Monday, 14 April 2014 at 03:17:54 UTC, Adam D. Ruppe wrote:
> On Monday, 14 April 2014 at 03:13:31 UTC, sdvcn wrote:
>> 			bh = false;// Are executed at any time ??????????
>
> That's never executed, but bh is automatically initialized to false when you declare it which is why you get bh:false at the end.

sorry,I made a mistake should be