Computer Science Canada ARRAYS |
Author: | Neo [ Wed Nov 24, 2004 11:08 pm ] |
Post subject: | ARRAYS |
If I had an array with 121 variables of boolean, how would I check to see if all of them are true? like this but shortened if num(1)=true and num(2)=true and num(3)=true...etc |
Author: | wtd [ Wed Nov 24, 2004 11:11 pm ] |
Post subject: | Re: ARRAYS |
Neo wrote: If I had an array with 121 variables of boolean, how would I check to
see if all of them are true? like this but shortened if num(1)=true and num(2)=true and num(3)=true...etc Use a loop. Remember that checking to see if they're all true is the same as checking to see if any of them are false. |
Author: | Hikaru79 [ Wed Nov 24, 2004 11:47 pm ] | ||
Post subject: | |||
|
Author: | wtd [ Thu Nov 25, 2004 12:02 am ] | ||||
Post subject: | |||||
Hikaru79 wrote:
Close, but you don't need the variable. And as long as you posted code...
|
Author: | Hikaru79 [ Thu Nov 25, 2004 12:09 am ] | ||||
Post subject: | |||||
wtd wrote: Hikaru79 wrote:
Close, but you don't need the variable. And as long as you posted code...
![]() |
Author: | wtd [ Thu Nov 25, 2004 12:29 am ] |
Post subject: | |
You had the basic idea down fine. You just weren't taking full advantage of "result". |