Computer Science Canada Procedure to Set Booleans |
Author: | Prince Pwn [ Tue Mar 27, 2007 8:34 pm ] | ||||
Post subject: | Procedure to Set Booleans | ||||
What I would like is one procedure that will set all booleans but one I specify in the argument to false. Like this is what I want below:
I would like the above to turn all the booleans false within the procedure except for userIconFade. Here is the actual part of my code and I have no procedure yet to do it, that's where I need the help.
|
Author: | Clayton [ Tue Mar 27, 2007 9:05 pm ] |
Post subject: | RE:Procedure to Set Booleans |
Right now, the only thing I can think of is to have an array of booleans and keep track of them by integer reference. Less readability, but the best of the two ways I can think of doing this. The other (worse) way of doing it would be to pass a variable argument to the procedure. Set all of your booleans to false, then set the variable argument to true. By far, this is a bad way to do it, and is not recommended. |
Author: | Cervantes [ Tue Mar 27, 2007 9:48 pm ] | ||||
Post subject: | RE:Procedure to Set Booleans | ||||
Prince Pwn wrote:
Why not do something simpler?
|
Author: | Prince Pwn [ Wed Mar 28, 2007 9:01 am ] |
Post subject: | RE:Procedure to Set Booleans |
Oh ya to above post, good idea =D I tried it when I first started my program and it was buggy but now it works. |