View unanswered posts | View active topics It is currently Tue Jul 22, 2014 8:02 pm






Reply to topic  [ 5 posts ] 
`intrinsic` keyword 
Author Message
Professor
User avatar

Joined: Sat May 18, 2013 1:24 pm
Posts: 272
Location: Olympia, WA
Post `intrinsic` keyword
I've been looking around in the system headers of RobotC 3.60, and there are lots of instances of the word `intrinsic` highlighted as a keyword. Apart from the obvious "it's intrinsic", what does this keyword actually do? :?

_________________
FTC Team 6424, the 'Oly Cow - Chief programmer.
FRC Team 4450, Olympia Robotics Federation (ORF).

and also quadrotors. Quadrotors!


Sat Jun 01, 2013 2:16 pm
Profile
Professor
User avatar

Joined: Sat May 18, 2013 1:24 pm
Posts: 272
Location: Olympia, WA
Post Re: `intrinsic` keyword
Ok, I found the explanation (in `RobotCIntrinsics.c`):
Code:
// Syntax Example,
//    'intrinsic variable'      -- Compiler directive to define an internal "intrinsic" variable "array".
//    'globalVar'               -- the variable name known to the compiler.
//    'propertyVar'              -- the type of variable/parameter
//    'kNumbOfGlobalVariablesInBytes'  -- the size of the 'array' for these variables. If this is not specified
//                                 then a non-array variable is being used. e.g. 'clock', or 'message'
//                                 and can be referred to by any value
//
//    Item can now be referenced in 'ROBOTC' code with 'globalVar[23]', 'globalVar[i]', ... format

Could someone explain this more clearly though? And can I use the keyword `intrinsic` in my own headers?

_________________
FTC Team 6424, the 'Oly Cow - Chief programmer.
FRC Team 4450, Olympia Robotics Federation (ORF).

and also quadrotors. Quadrotors!


Sat Jun 01, 2013 2:50 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3162
Location: Rotterdam, The Netherlands
Post Re: `intrinsic` keyword
No, you shouldn't use them, they for internal commands only to "translate" ROBOTC user commands and variables into VM opcodes and variables.

= 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 Jun 01, 2013 3:27 pm
Profile WWW
Professor
User avatar

Joined: Sat May 18, 2013 1:24 pm
Posts: 272
Location: Olympia, WA
Post Re: `intrinsic` keyword
Ok, thanks! I knew I was getting into stuff I shouldn't touch :)

_________________
FTC Team 6424, the 'Oly Cow - Chief programmer.
FRC Team 4450, Olympia Robotics Federation (ORF).

and also quadrotors. Quadrotors!


Sat Jun 01, 2013 11:37 pm
Profile
Moderator
Moderator
User avatar

Joined: Wed Mar 05, 2008 8:14 am
Posts: 3162
Location: Rotterdam, The Netherlands
Post Re: `intrinsic` keyword
The last guy we warned about this, went ahead and did it anyway. There was a loud explosion reported in his area and he hasn't been seen since. This was the last captured image from his webcam:
Attachment:
nicolas-cage-ghost-rider_288x288.jpg
nicolas-cage-ghost-rider_288x288.jpg [ 54.69 KiB | Viewed 2207 times ]

Just be careful, this is powerful stuff. We were all surprised to find out Nicholas Cage was actually really into programming robots, but there you go.

= 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]


Sun Jun 02, 2013 1:23 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


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.