|
Re: What are RobotC tasks?
Yeah, that's the standard C way of returning values, just didn't know if it worked or not (haven't had time to reload the firmware on my VEX robot and do debugging yet). Thanks for letting me know!
After doing a little bit of research, it looks like they have extensively modified the compiler to slim it down. For one thing, there's no pointers, which is a standard C concept available in all real C compilers. This leads me to believe that they have built "task" into the compiler itself and not declared it anywhere. Oh well, I was just wondering if I could find its declaration to figure out its properties a little better (i.e. why you have to use StartTask() and StopTask() instead of just calling it like a function).
After modifying and compiling a fairly complex program I wrote in WPILib and then in Default code onto RobotC, it looks like most of the standards work except for pointers. It gave me a warning about embedding a command inside an if statement ( if( (wheel[0] = forward+...)>127) ), so I'll have to make sure that it works.
And something that's rarely done in C, but does have to happen occasionally is that multiple C files are included into the project via #include "..." (instead of just headers). You just have to include the other C files into the main project file. Is this just a limitation of the trial version, or something inherent to RobotC as a whole? Just curious, I like to know as much about a programming language/environment as I can before I start teaching it to other people.
Thanks for the information!
Aaron
|