Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Autoincrement operator precedence difference between C and Perl

by Corion (Patriarch)
on Oct 09, 2007 at 07:01 UTC ( [id://643633]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://643633]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (2)
As of 2026-02-07 00:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.