View unanswered posts | View active topics It is currently Wed Sep 23, 2020 4:18 pm

Reply to topic  [ 1 post ] 
Some RobotC problems that I have encountered 
Author Message

Joined: Sat Feb 13, 2010 6:45 pm
Posts: 1
Post Some RobotC problems that I have encountered
Hello all,

I am a current CMU student taking a Robotics class and we are programming the NXTs using RobotC. I have come across several things that have contributed to a couple frustrations that I have had.

The following code is the exact code that I have been using for an absolute value function:
#define ABS(x) (x)>0 ? (x) : (-(x))

However, for some reason, this macro does not quite output the correct value. I think there may be some problems in the pre-processor.

Memory Allocation
I know there is no support for memory allocation but why is that? If this language is built upon just the C language (which i assume it is... shouldn't it be able to take advantage of probably the most powerful part of programming in C?)

There is very little optimizations that are done when compilation occurs. I can tell because recently I was programming a multi-threaded program and realized that by simply combining a couple of mathematical operations(addition/subtraction/multiplication/division), the code was able to produce much more reliable results while also being computed much faster. However, in C, a lot of optimizations are performed regarding this manner and I have never had this problem before when coding in C.

There is no support for recursion and I'm not sure why. A lot of traversal algorithms, like DFS, are innately recursive and although it is pretty simple to write DFS in a iterative manner, there are much much more complicated algorithms that depend on recursion, mainly a lot of dynamic programming algorithms. A lot of concepts in Robotics will require recursion and this is this almost necessary to support!

Anyways, I was hoping that some of these issues could be fixed in the near future as it would make the transition from programming in C to RobotC less painful and much easier to work with!

Sat Feb 13, 2010 7:10 pm
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

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.