What if....
Thierry Douez
th.douez at gmail.com
Tue Jan 29 02:40:59 EST 2013
2013/1/29 Paul Hibbert <lc at pbh.on-rev.com>
> Thierry,
>
> Just fill in the blanks!
>
Hi Paul,
Thanks for your tries.
But...
After an if , there is a condition which is true or false;
don't have to check for each sub-condition if it is true, for instance:
put true into test
if test then put "Ok"
is the same as
if test is true then put "Ok"
and anyway, doesn't change the fact that case 1 and 4 have different
results,
which with my little understanding they should not (case 1 should be true) !
Regards,
Thierry
> on mouseUp
> if false is true or true is true and false is true then ## = False
> answer "Got it 1!"
> else
> answer "False 1!"
> end if
> if false is true or (true is true and false is true) then ## = False
> answer "Got it 2!"
> else
> answer "False 2!"
> end if
> if false is true or true is true then ## = True
> answer "Got it 3!"
> else
> answer "False 3!"
> end if
> if false is true and false is true or true is true then ## = True
> answer "Got it 4!"
> else
> answer "False 4!"
> end if
> end mouseUp
>
> Paul
>
>
> On 2013-01-28, at 9:33 PM, Thierry Douez wrote:
>
> > Hi Jacques,
> >
> > Thanks for testing.
> >
> > Umm, I don't have the correct answers.
> >
> > The first test gives me False, which should be the same
> > as the fourth case which gives True!
> >
> > Or, did I miss something ?
> >
> > Thierry
> >
> > 2013/1/28 J. Landman Gay <jacque at hyperactivesw.com>
> >
> >> On 1/28/13 6:36 AM, Thierry Douez wrote:
> >>
> >> So, smart livecoders, try to guess what would be the 4 answers to this
> >>> script;
> >>> then run it and thanks to comment :)
> >>>
> >>>
> >>> on mouseUp
> >>> if false or true and false then
> >>> answer "Got it 1!"
> >>> else
> >>> answer "False 1!"
> >>> end if
> >>> if false or (true and false) then
> >>> answer "Got it 2!"
> >>> else
> >>> answer "False 2!"
> >>> end if
> >>> if false or true then
> >>> answer "Got it 3!"
> >>> else
> >>> answer "False 3!"
> >>> end if
> >>> if false and false or true then
> >>> answer "Got it 4!"
> >>> else
> >>> answer "False 4!"
> >>> end if
> >>> end mouseUp
> >>>
> >>
> >> Got them all correct the first time. :P
> >>
>
More information about the use-livecode
mailing list