Limits to functions?

  • Thread starter Thread starter Bj
  • Start date Start date

Bj

Addon Developer
Addon Developer
Donator
Joined
Oct 16, 2007
Messages
1,886
Reaction score
11
Points
0
Location
USA-WA
Website
www.orbiter-forum.com
Is there a limit on a functions length?

example, can it be 700 lines long?

Edit, this is standalone, not running at the same time with obiter yet. SO dont have to worry about CPU power.
 
No limit. Except your capability of understanding it...

My record are about 2500 lines of C code, but it was a complex pattern of varying communication calls, each ten lines long...
 
There is no limit, however you should keep your functions small, improves readability. As a general rule, a function should not be longer then one screen length.
 
There is no limit, however you should keep your functions small, improves readability. As a general, a function should not be longer then one screen length.

This particular part is going to be really repetitive. I am going to try to weed it down to reusable functions though.

Thanks
:cheers:


My record are about 2500 lines of C code

what could you possibly be writing thats so long?
 
what could you possibly be writing thats so long?

Was the first version of a robot control code to teach a robot to take ice with a shovel. Was force controlled (the robot was capable of sensing contact and weight forces) and we relied on a vision system for unloading the ice into a glass...

It had basically the same capabilities as the Canadarm2 - but it didn't move the Shuttle around the ISS and Canadarm2 does not mix cocktails. :beach:
 
Back
Top