Hello all, I am just trying to do a simple nested function poc. I tried compiling the below code with --c99 and --relaxed_ansi compiler flags as that indicated it would allow those extensions but no luck. The compiler gives an error of expected a ';' where I try to define double square(double z)
Can anyone point out what I am missing in getting this to compile? Note I am using compiler TI v20.2.4.LTS
#include <stdarg.h>
#include <string.h>
double foo (double a, double b)
{
double square (double z)
{
return z * z;
}
return square (a) + square (b);
}
int main(void)
{
int i = 0;
i = foo(3,3);
return i;
}
