in reply to Autoincrement operator precedence difference between C and Perl

This is less a Perl FAQ than a C FAQ. Even under C, the evaluation order of expressions is undefined and what you claim as "C" varies between compilers and optimization settings. Google for C FAQ preincrement.

  • Comment on Re: Autoincrement operator precedence difference between C and Perl

Replies are listed 'Best First'.
Re^2: Autoincrement operator precedence difference between C and Perl
by oha (Friar) on Oct 09, 2007 at 10:21 UTC
    not only the order isn't defined but the result too.
    the code (a=B)*c/(a=C) in C not only means that you can't know if a will be B or C, but it can be something else (suppose the code run on a 16 bit host and a is 32 bit...)

    Oha