Thread overview | |||||
---|---|---|---|---|---|
|
April 14, 2014 Bug? Please compile the code "DMD32 D Compiler v2.065" | ||||
---|---|---|---|---|
| ||||
"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 Re: Bug? Please compile the code "DMD32 D Compiler v2.065" | ||||
---|---|---|---|---|
| ||||
Posted in reply to sdvcn | 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 Re: Bug? Please compile the code "DMD32 D Compiler v2.065" | ||||
---|---|---|---|---|
| ||||
Posted in reply to Adam D. Ruppe | 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
|
Copyright © 1999-2021 by the D Language Foundation