Is there a function that turns on something if its off and viceversa?
For example if you type the letter a, the program checks if its on(1) or off(0), if it has a 1 value then it prints a 0 value, and if it had a 0 value it prints a 1 value.
Please help, or tell me where can I find info on this. ???
Thanks
Condition quiestion
Moderators:Administrator, Global Moderator
-
- QBasic God
- Posts:166
- Joined:Tue Mar 25, 2003 12:45 am
- Location:U.S.A.
- Contact:
Re: Condition question
You can use the XOR function for a toggle switch...
Code: Select all
LOOP
A% = A% XOR 1
Print A%
DO
Come check out [url=http://www.freebasic.net/forum/index.php]FreeBASIC[/url]. The syntax is based on QuickBasic, but it expands to use pointers, operator overloading, etc... The list goes on and on!
Re: Condition quiestion
That's exactly what I was looking for. :)
Thank you so much!
Thank you so much!