How do I check for two conditions to be true?
Devin Asay
devin_asay at byu.edu
Fri Sep 25 13:51:44 EDT 2009
On Sep 24, 2009, at 1:34 PM, William de Smet wrote:
> Hello there,
> This must be an easy one but it got me puzzled: How do I check for two
> conditions to be true at the same time?
> I want to check the startangle of two graphics to be true: the
> startangle of
> grc "1" is 270 & the startangle of grc "2" is 20
> Do I use if..then?
> on mouseup
> If the startangle of grc "1" is 270 & the startangle of grc "2" is
> 20 (???,
> this doesn't work)
> then ......(following code)
> end mouseup
>
> What to do with the check for the second graphic?
> How do I combine these?
You're very close. Just use the keyword AND (not case senstive, just
in upper case for clarity):
if the startangle of grc "foo" is 270 AND \
the startangle of grc "bar" is 20 then
-- do stuff
end if
HTH
Devin
Devin Asay
Humanities Technology and Research Support Center
Brigham Young University
More information about the use-livecode
mailing list