short-circuiting
- Posted by "Frankie Dowling" <francis at gmx.co.uk> Jun 02, 2004
- 546 views
I haven't used euphoria for a while, and have just got back into it. Quick question about short-circuiting a function: from memory euphoria allowed this to short-circuit...? but does not work however function test(object whatever) return (sequence(whatever) and (length(whatever) = 4)) end function test(0) errors because it goes on to call length(), however this code: int test(int whatever) { if ((++whatever == 1) && (++whatever == 2)) { } return whatever; } prints 1 as expected. so how do I achieve the same logic in euphoria? -- +64 (03) 3522885