Another silly question.
Cant find this indo in the help.
How many times can I call a macro.
ie. call a macro from a macro from a macro..........................
Is this possible at all?
Thanks again
Brian
How many levels deep can macros be called?
-
- Posts: 110
- Joined: Thu Sep 29, 2005 10:53 am
- Location: Matrix Multimedia
- Been thanked: 1 time
- Contact:
No idea off hand.
I don't think there is a limit (Steve will be able to say for sure) but having way too many would get confusing and start to become unweildly. So for practical purposes there is a limit based on humna
I have had bunches of macros in macros in macros etc. without problem.
I don't think I've ever had a program fail because it has had too many macro layers in it.
I don't think there is a limit (Steve will be able to say for sure) but having way too many would get confusing and start to become unweildly. So for practical purposes there is a limit based on humna
I have had bunches of macros in macros in macros etc. without problem.
I don't think I've ever had a program fail because it has had too many macro layers in it.
- Steve
- Matrix Staff
- Posts: 3422
- Joined: Tue Jan 03, 2006 3:59 pm
- Has thanked: 114 times
- Been thanked: 422 times
- Contact:
There is a limit because the 16F PICmicros have an internal stack limited to 8 addresses. This means that you can only have 8 nested macro calls (assuming interrupts are not used). This is plenty for the majority of apps.
Incidentally, the new v3 of FlowCode uses a different underlying compiler which actually gives an error message when the stack level is exceeded.
Incidentally, the new v3 of FlowCode uses a different underlying compiler which actually gives an error message when the stack level is exceeded.