Part Number:UCD3138
Tool/software: TI C/C++ Compiler
Dear expert,
Currently I'm using UCD3138 device, CCS7, compiler is ARM v5.2.4.
Please see below codes, in file A, clarify the func_test with on argument with return value, but in file B, the func_test definition without argument. I found that this can be build, link correctly, and run file and the result is correct. Can you please help me know the reason why it won't affect the result? Is there any risk if write code in this way? Thanks...
File A:
extern long func_test(long i);
long result = 0;
void main(void)
{
... ...
result = func_test(500);
... ...
}
file B:
long func_test(void)
{
long a = 100;
long b = 200;
return (a+b);
}