Reply To: CMac Documentation/Tutorial

Product Compare Forums Multi-Edit Suggestions CMac Documentation/Tutorial Reply To: CMac Documentation/Tutorial

#3204
deleyd
Participant

I’m discovering that CMAC is like PASCAL in that you have to place code which calls a function below the function itself. For example, the following doesn’t compile:

void test()
{
move_vertical(10);
}

void move_vertical(int i)
{
//some code…
}

However, if I put function ‘test’ at the bottom instead of at the top, then the compiler doesn’t complain. CMAC documentation does talk about prototyping functions which are in other files, but it doesn’t say how or if it’s possible to prototype a function that exists later below in the same file. My brief attempt to add a prototype of function move_vertical to the top of the file failed.