tell me if I'm wrong or not, but it seems to me that recursion with limited depth is allowed with dspic devices
then this code :
Code: Select all
float ex ;
float expo(float f, int n)
{
float e ;
if(n == 1) return(f) ;
e = expo(f, --n) ;
return(e * f) ;
}
main()
{
ex = expo(2.0, 2) ;
}
but running it in watch window, I get an "Inaccessible" value for the local variables (this may be ok) but the return value of the function is not correct : 0 instead of 4
Thanks,
Bruno