Are the values 'char's? Char is signed by default on CW, so 128 (0x80)
would be negative (less than nIndex).
-jjf
-----Original Message-----
From: Evgeny Rokhlin [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 31, 2000 1:16 AM
To: Palm Developer Forum
Subject: Error using "while" in CW6
I can't believe my eyes!
My program (executed on Palm) gave me results, that were different from
the
results of the same program, executed on PC.
I used debugger and found out, that in this piece of code:
while( nIndex < nAmount )
{
.......calculations;
nIndex++;
}
pKey->m_lLastRead += nIndex-1;
Having nIndex=0 and nAmount=128 the compiler ignored
{ .......calculations;
nIndex++;
}
and went straight to the line pKey->m_lLastRead += nIndex-1; !!!
Well, can't I use while() in CW?
--
Best regards
Evgene Rokhlin,
Software Engineer.
mailto:[EMAIL PROTECTED]
http://www.ectaco.com
--
For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palm.com/devzone/mailinglists.html
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html