Re: error mess ??
- Posted by Robert Craig <rds at ATTCANADA.NET> Sep 10, 1999
- 390 views
Bernie Ryan writes: > I get the message Warning: call to foo() might be short-circuited The message should be improved so it tells you where the call to foo() is. It's on my list. Look for a call to foo() that comes after an "and" or "or" in an if/elsif or while statement. Euphoria is warning you that the call to foo() might not always take place, because of Euphoria's "short-circuit" evaluation. e.g. if a = b and foo() > 0 then ... When a != b Euphoria will not bother to call foo() since the if-condition is obviously FALSE. Euphoria will not issue this warning when it is sure that foo() has no side-effects, i.e. foo simply returns a value and has no other effect such as I/O, setting global variables etc. This warning was added in 2.1 to help detect any problems in code developed for 2.0 or earlier when short-circuiting did not exist and conditions were always fully evaluated. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com