topgraphie
Programmer
Hi
Borland c++6.0, all code optimization off. In the fault case - see code - debugger bypasses the entire loop including the trailing i=0 statemenet. What's wrong?
tY
void __fastcall TForm1::Button1Click(TObject *Sender)
{
int i=0;
while(1)
{
// i++; // doesn't work
if(i==10000) break;
i++; // works
}
i=0;
}
Borland c++6.0, all code optimization off. In the fault case - see code - debugger bypasses the entire loop including the trailing i=0 statemenet. What's wrong?
tY
void __fastcall TForm1::Button1Click(TObject *Sender)
{
int i=0;
while(1)
{
// i++; // doesn't work
if(i==10000) break;
i++; // works
}
i=0;
}