Topic : The number of nested functions

Forum : ST7/STM8

Original Post
Post Information Post
April 15, 2011 - 3:27pm
Guest

Hi,

Is there a limit to call nested functions in STM8 compiler? Or what are the constraints of nested functions?

Thanks&Regards

Replies
Post Information Post
+1
0
-1
April 18, 2011 - 8:25am
Raisonance Support Team

Hi Volkan,

There is no limitation on the number of nested function calls. The compiler is fully recursive, so it will call functions forever.
One "hard" limitation though is that the stack size is limited. The usual limitation (depends on your device) is around 1024 bytes, which should be plenty enough even for highly recursive functions, as long as you do not have too many local variables on stack.

Best Regards