
WARNING: RobotC bug prevents having more than 100 methods!!!
Okay, so I was really ticked off at 3:00am when I ran into this bug (again). I posted the first time about this but the developers never did anything about it...and now that I know what it is I realize they didn't even remotely try. Because they should have been able to tell me immediately what the issue was.
So now after a some sleep I'm only a little ticked off. Not because of the bug or even the limitation to RobotC, but because I believe the developers knew about the limitation (maybe even the bug too), and are intentionally trying to hide this limitation. If they were being up front they'd say on the description page. "Hey, this is RobotC. Its sorta like C but for Robots. Also you can only have 14 files and 100 functions, but its really alot like C so use it."
So the limitation is simple. You can't use more than 100 functions in a program. One nice thing is the compiler stats tell you how many you have. DEVELOPERS: WHY DIDN'T YOU SAY SOME THING LIKE "using 25 of 100 methods". Its just common sense to list limits next to usage!
The lack of documentation is just laziness, but the bug is something truely awesome to behold. Talk about a total lack of unit testing!
If you happen to use more 7-8 functions in each of your 14 allowed files ... then when you try to call the 101st function you get a RUNTIME ERROR. Yes, that's right. The compiler happily compiles as many functions as you are willing to type, but it CAN'T ACTUALLY CALL THEM.
I'm sorry but the excuse that "99.9% of RobotC users over the past 3 years haven't needed this functionality" just doesn't cut it. I call your bluff. I think its a limitation of your runtime and like all the other limitations you just fail to document it. Because I don't honestly believe you could successfully build something a complex as RobotC and the different firmwares and "overlook" the fact that you have a limit on the number of functions or files allowed in a program.
I can't even begin to imagine why this isn't at least flagged by the compiler. This lack of compiler warnings/errors and the total lack of documentation related to exactly how RobotC isn't ANSI C seems to say you're intentionally hiding RobotC limits. WE'RE PROGRAMMING A MICROCONTROLLER WE EXPECT LIMITS. WE JUST NEED TO KNOW WHAT THEY ARE BEFORE WE RUN HEADFIRST INTO THEM!
Oh, for those who don't want to type 101 functions for yourself to see the bug. Here's a test file to play with. Even the debugger can't break on the 101st function call

I'm going to write a Python script to automatically refactor code to remove the least needed functions. So I'll post that when I get it done. Right now my robot code is sitting at exactly 100 methods. I've been sitting right at the bleeding edge of disaster for a week and never knew it. And I still need to put autonomous back in
