Forum : ST7/STM8
Original Post
Post Information | Post |
---|---|
April 15, 2011 - 3:27pm
|
Hi, Is there a limit to call nested functions in STM8 compiler? Or what are the constraints of nested functions? Thanks&Regards |
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