However, it is not recommended due to issues in readability and maintainability (two copies of the same code to maintain, and people might not rember to update one when they update the other!). What are my alternatives? Function duplication (albeit with a different function name) is an “easyish” hack that may get you where you want to be. This lack in functionality (and a rather serious one at that!) is the one item that makes the XC8 compiler non-compliant with ANSI. “Due to limited memory and no hardware implementation of a data stack, recursion is not supported and functions are not reentrant.” – MPLAB XC8 C Compiler User’s Guide Printf("%s, %i: ", _FILE_, _LINE_) \ĭPRINTF(( "x = %i", x)) // This will print something like "main.c, 23: x = 3"īecause of the hardware-limited stack size on the microcontrollers the XC8 compiler targets, the compiler does not support recursive functions.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |