adruab.net Deep internal/external searching… for… stuff

13Jan/062

Aggrivating Oops’

Say function f() has side effect. Then change a call like:
r1 = f(); r2 = f(); r3 = f(); g(r1,r2,r3)
to this:
g(f(), f(), f())

And then wonder for hours why the results are all screwed up. It's because the evaluation order of function arguments is not guaranteed! Aaaaargh! At least I found it (and 3 other versions of the same mistake).... *sigh*

Sorry for the boring post. So... I hear Uwe Boll's latest movie died (BloodRayne). However, I also hear that Underworld 2 is coming out on the 20th (OMGROFLBBQ Awesome!). I love that acronym :).

Comments (2) Trackbacks (0)
  1. As far as I know, the order of parameter evaluation for a function *is* guaranteed—to be backward. ie: parameters are always evaluated from last to first.

    Correct me if I’m wrong though.

  2. I don’t know how far spread the story was but I was enlightened (and enraged) when I learned that Uwe was actually making such horrible movies on purpose because they were making him so much money. It hurts my head. I feel so sorry for those poor video game titles. That and since I can’t read that function too well anyway, it was easier to talk about movies.


Leave a comment

No trackbacks yet.