Re: Unusual EU Problem (must see)
- Posted by Pete Lomax <petelomax at blueyonder.co.uk> Aug 17, 2003
- 443 views
On Sat, 16 Aug 2003 19:18:12 +0000, Al Getz <Xaxo at aol.com> wrote: >with trace >trace(1) > >procedure DoThis() > ?1 >end procedure > >procedure DoThisToo() > ?2 > return DoThis() >end procedure > >DoThisToo() >----------------------------------- > >--Note that in line 10 when DoThis() is called Ah! There is your misunderstanding. Line 10 is not executed. The "return" on line 10 is executed, not "return DoThis()". OK, it is quite confusing, a good example of bad coding style making a program virtually unreadable, and also a good reason to avoid the evil "without warning" and/or ignore those pesky helpful hints Eu tries to give you once the program finishes Your example is the opposite of: ?4 + 5-3 * 10 which prints -21 (think about it, not 4 and an error, and not 60 or perhaps even 24, which are other ways a human might read it...) and your example is a bit similar to: function max(integer a, integer b) if a>b then return a else return b end if end function Maybe someone should write a style checker for Eu code. HTH Pete