1. Re: sports calculator

Wolf writes:
> If you've tried it:
> can anyone explain the:
> Warning: call to isChecked() might be short_circuited
> ... in plain english.

One of your calls to isChecked() looks like:

    if getCount(List1) < 1000 and isChecked(Check3) = 0 then

Euphoria wants you to know that if
       getCount(List1) < 1000
is FALSE, then the call to isChecked() will not happen. It will be
"short-circuited" using a new feature of Euphoria 2.1. Euphoria
would normally not complain about this, but it knows that function
isChecked() contains calls to other functions such as
SendMessage() that appear to have "side-effects",
i.e. lasting effects that go beyond simply returning a value.

If Euphoria can tell that a function has no side-effects then it
won't complain about it being short-circuited,
e.g. if you were calling the sin() function, then
there could not be any problem with skipping the call - you
only care about the result of sin() - it doesn't send messages,
set global variables, do I/O etc.

The main reason for adding this warning to Euphoria 2.1
was because earlier versions of Euphoria do not have this
short-circuit optimization.

You can stop the warning by putting:

"without warning"
...
"with warning"

around the routine that contains the offending call
to isChecked().

Regards,
     Rob Craig
     Rapid Deployment Software
     http://members.aol.com/FilesEu/

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu