![]() |
Re: [FTC]: Robot C
Quote:
|
Re: [FTC]: Robot C
Quote:
{ code for what you want to happen here } else { code to make that stop happening } this is still as efficiant i tried it today. |
Re: [FTC]: Robot C
Quote:
You need to understand that a boolean true/false in ROBOTC is the same as 1 or 0 where 'true' is the same as '1' and 'false' is the same as '0'. Therefore the follow statements are all logically equivalent: Code:
if(value == true)So as long as the value variable in our example here is already a boolean, there is no need to explicitly check it for truth. That is there is no need to explicitly test if true is equal to true of if false is equal to false... just pass the boolean itself to the if() statement like: Code:
if(value)Well because those functions return a boolean. That means when you call the function you get back either a true or a false and there is no need to see if that is not equal to 0. Just test against the returned boolean like: Code:
if(joy1Btn(1))Hope this clears us some of the fog. ;) |
Re: [FTC]: Robot C
ahh i see... yeah that makes sense... i guess my brain is just wired in some screwed up way haha
|
Re: [FTC]: Robot C
Quote:
|
| All times are GMT -5. The time now is 13:05. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi