is it true ?
Alex Tweedly
alex at tweedly.net
Thu May 19 06:09:05 EDT 2005
Jeanne A. E. DeVoto wrote:
>
> Note: Transcript uses what is known as "short-circuit evaluation"
> for logical operators. This means that value1 is evaluated first. If
> value1 is false, the expression value1 and value2 is false regardless
> of what value2 is (because the expression evaluates to false unless
> both the values are true). In this case, Revolution does not evaluate
> value2, since doing so is not necessary to determine the value of
> value1 and value2. For example, evaluating the expression asin(2)
> normally causes an execution error (because 2 is not a legal argument
> for the arc sine function), but evaluating the expression (1 = 0) and
> (asin(2) = 1) does not cause an error: since (1 = 1) is always false,
> the whole statement is always false and Revolution never tries to
> evaluate the asin function.
>
> (This is under "and" and "or", and probably at least the first part
> should be included in "if" as well.)
>
Probably should be under 'if' and maybe under 'switch/case' as well;
hopefully while changing that, someone will fix the typo that inverts
the meaning .....
> expression (1 = 0) and (asin(2) = 1) does not cause an error: since
> (1 = 1) is always false, the whole statement is always false and
> Revolution never tries to evaluate the asin function.
>
should be "since (1 = 0) is always false"
--
Alex Tweedly http://www.tweedly.net
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.322 / Virus Database: 266.11.12 - Release Date: 17/05/2005
More information about the use-livecode
mailing list