C++ behavior for 'while' using output from function
Posted on 2011-10-25
VS 2005, C++, WinXP SP2
I'd like the experts opinions on what the 'while' loop below does? Does it takes the result from AtPollEvent and compare against NOT being -1 and assigns that to retvalue. OR does it assign retvalue the result from AtPollEvent and then compares against NOT being -1?
AtPollEvent(connId, eventName, (EventType *)&eventValue);
int retvalue = 0;
while ((retvalue = AtPollEvent(id, Aname, (EventType *) &lockvalue) != -1))
Thanks for your input.