digitalmars.D - Bug? Please compile the code "DMD32 D Compiler v2.065"
- sdvcn (29/29) Apr 13 2014 "DMD32 D Compiler v2.065
- Adam D. Ruppe (4/5) Apr 13 2014 That's never executed, but bh is automatically initialized to
- sdvcn (2/7) Apr 13 2014 sorry,I made a mistake should be
"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
Apr 13 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.
Apr 13 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:sorry,I made a mistake should bebh = 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.
Apr 13 2014