View unanswered posts | View active topics It is currently Tue Aug 30, 2016 4:49 pm






Reply to topic  [ 2 posts ] 
C order of Operations: is there an RobotC operator for ±? 
Author Message
Site Admin
Site Admin
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3654
Location: Rotterdam, The Netherlands
Post Re: C order of Operations: is there an RobotC operator for ±
No, ROBOTC does not have that specific operator. I am pretty sure that it does not exist in ANSI C or C++ either. I am not sure I could even type it on this keyboard without resorting to either copying and pasting or ALT-keypadnumbers.

= Xander

_________________
| Professional Conduit of Reasonableness
| (Title bestowed upon on the 8th day of November, 2013)
| My Blog: I'd Rather Be Building Robots
| ROBOTC 3rd Party Driver Suite: [Project Page]


Sat Jul 19, 2014 9:58 am
Profile WWW
Professor
User avatar

Joined: Sat Aug 31, 2013 9:15 am
Posts: 256
Post Re: C order of Operations: is there an RobotC operator for ±
There is another way you could do it using the abs function. Something like:
Code:
abs(green - SensorValue[light2]) < 5

_________________
FTC Team 6100 Chariots of Fire - Programmer (2012-2013)
FTC Team 7468 Blue Chariots of Fire - Programmer (2013-2014)
FTC Team 7468 Blue Chariots of Fire - Mentor (2014-2015)
Check out our team website at http://bluechariotsoffire.com/.


Sat Jul 19, 2014 2:31 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.