Hi,
If I try to pass a 16bit integer to a function I get this message :
Error 112 "test3.c" Line 14(1,1): Function used but not defined: ... Test SCR=393
The code looks like this
>>>>>>>>>>
include <18F2525.h> // preprocessor directive that selects the chip
void Test(long); // function prototype
void main(void)
{ long a;
a= 0xffff;
Test(a);
}
void Test(x)
{
long i;
i=x;
}
<<<<<<<<<<
It is the same whether I use long or int16. The function prototype looks ok. If I replace long by int8 it works!
I'm using compiler version 4.071
What am I doing wrong?
Ttelmah Guest
Posted: Fri Aug 22, 2008 2:36 pm
Your prototype, needs to match your definition, and _both_need to define the variable. So:
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum