From: Seebs Date: 2009-11-22T07:30:12+09:00 Subject: Order of evaluation and precedence In _The Ruby Programming Language_, it is asserted that order of evaluation is controlled by precedence. However, this is often asserted in books about C, where it's definitely not true. Is it actually true in Ruby? In other words: def a puts "a" 1 end def b puts "b" 1 end def c puts "c" 1 end x = a + (b + c) Is it actually guaranteed that the output will have "a" after "b" and "c"? In C, it wouldn't be. (Compilers are free to evaluate the operands in any order whatsoever, then feed them into operators, all that precedence and grouping controls is which operands go to which operators.) -s -- Copyright 2009, all wrongs reversed. Peter Seebach / usenet-nospam@seebs.net http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!