View unanswered posts | View active topics It is currently Thu Dec 18, 2014 11:16 pm






Reply to topic  [ 5 posts ] 
RobotC Environment 
Author Message
Rookie

Joined: Mon Mar 10, 2014 2:17 am
Posts: 6
Post RobotC Environment
What is the capitalization scheme of built-in variables and functions used in RobotC?

Does this following sound correct:

* All built-in variables (like motor[], nVolume) use headlessCamelCase

* All built-in functions always use CamelCase

* All built-in scalar variables use a "data type" prefix, either "n" or "b", while arrays never use a "data type" prefix. "n" must stand for number (or integer?). "b" stands for Boolean.

Is this correct?


Mon Mar 17, 2014 4:44 am
Profile
Rookie

Joined: Mon Mar 10, 2014 2:17 am
Posts: 6
Post Re: RobotC Environment
Can RobotC display more informative inline tips for functions and variables, something like this attachment here?

This would be of great help for students who are moving from NXT-G visual environment.


Attachments:
FunctionTips.png
FunctionTips.png [ 5.63 KiB | Viewed 933 times ]
Mon Mar 17, 2014 6:56 am
Profile
Moderator
Moderator

Joined: Thu Jan 03, 2013 5:10 pm
Posts: 198
Location: The plateau north of the Ohio River Valley, also known as Cave Country.
Post Re: RobotC Environment
Is that Visual Basic? I'm just curious. As to your question, I'm not really sure. Since ROBOTC does not support classes (aka objects), capitalization practices are somewhat arbitrary.

_________________
I'm not a robot! I'm british! ~ quote from an asparagus
I am not a robot! I am a unicorn! ~ quote from a robot


Tue Mar 18, 2014 1:29 pm
Profile
Rookie

Joined: Mon Mar 10, 2014 2:17 am
Posts: 6
Post Re: RobotC Environment
Thanks for the reply. It is helpful.

Yes, you guessed it, this is VBA environment, although I tried to mimic C syntax ;) I had Office available on this computer, so I used Access to create the screenshot.


Tue Mar 18, 2014 1:42 pm
Profile
Moderator
Moderator

Joined: Thu Jan 03, 2013 5:10 pm
Posts: 198
Location: The plateau north of the Ohio River Valley, also known as Cave Country.
Post Re: RobotC Environment
You're welcome. The "As" keyword gave it away :)

_________________
I'm not a robot! I'm british! ~ quote from an asparagus
I am not a robot! I am a unicorn! ~ quote from a robot


Tue Mar 18, 2014 2:10 pm
Profile
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.