Problem: compiling functions with function pointer as a
parameter.
Example: definition of int test(int (* fn)(int)) given
below
Error message: OnBoard Asm gives message:
"Comma or Right parenthesis expected in Proc parameter
list" then "Assembly abended"
Using VFSDos for ease, sample code:
-----------------------------------------------------------------------
#include "stdio.h"
int square(int x);
int test(int (*fn)(int));
void main() {
printf("4 squared is %d", test(square));
}
int square(int x) {
return x*x;
}
int test(int (*fn)(int)) {
return (*fn)(4);
}
--------------------------------------------------------------------
Logged In: YES
user_id=583634
Second. I'm surprised this hasn't been spotted before, would
be good to verify it.
Almost certainly a parser/code generation problem.