El 28/03/2006, a las 20:43, Tony Lewis escribió:
Hrvoje Niksic wrote:The cast to int looks like someone was trying to remove a warning and botched operator precedence in the process.I can't see any good reason to use "," here. Why not write the line as:eta_hrs = eta / 3600; eta %= 3600;
Because that's not equivalent. "The sequence or comma operator , has two operands: first the left operand is evaluated, then the right. The result has the type and value of the right operand. Note that a command in a list of initializations or arguments is not an operator, but simply a punctuation mark!".
Cheers, Greg
smime.p7s
Description: S/MIME cryptographic signature