Re: rand(repeat(num_subjects, num_subjects))

new topic     » goto parent     » topic index » view thread      » older message » newer message

>>    My understanding is that you are saying I would like to evaluate "a"
>>expression by saying:
>>    if a =  1 then
>>        do this
>>    elsif a= 1 and a = 2 then
>>        do that
>>            exit
>>     elsif a = 1 and a = 2 and a = 3 then
>>        do the other thingamajig
>>            exit
>>    else
>>        don't do anything at all
>>    end if
>>If done sequentially according to the way you expect them to come out, it
>>should short circuit itself just fine right???
>
>    Hmm... if a = 1 then "do this" is done, else the other conditions can
>    never possibly be right! (except the "don't do anything at all" part is
>    done...)
>
Hmm.. I guess you are right... You would have to reverse it...

if a = 1 and a = 2 and a = 3 then
     do the other thingamajig
     exit
elsif a= 1 and a = 2 then
        do that
            exit
elsif a =  1 then
       do this
            exit
else
        don't do anything at all
end if

Is this better?  I guess the key word to get in my post was "If done right"
:)
Monty

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu