Page 1 of 1

PostPosted: Mon Dec 10, 2001 6:41 pm
by maurub
I have a question for you. As I used to program in C, the first step is declaring variables and prototype of functions. In PocketC I have been with some problems, because when I declare some prototypes, sends me a counter 9 message and cant run the program. Instead I tried to make a .h file,and then use it in the main program with INCLUDE but I could not. As a last resource, I typed everything in the program, but it seems that the order in wich I type the prototypes are very significant... Can anyone help me please? Thanks in advance.

PostPosted: Mon Dec 10, 2001 9:07 pm
by wolfgang
Prototypes are supposed to work in PocketC and they do work for me). If you could post some sample code that shows the problem, I could have a look at it. Without code things are too fuzzy and it is impossible to see what you or PocketC are doing wrong.


PostPosted: Tue Dec 11, 2001 2:36 pm
by guy
You can't declare a return type with a prototype in PocketC, and you have to use the ANSI format for prototypes, not the original format:

afunction(int i, int j, int k) ;


afunction(int i, int j, int k) {

return(i*j*k) ;

If you are prototyping a function that is in an external DLL designed to work with PocketC, then you have to place the whole prototype on a #export line that also names the DLL and the entry point number:

#export mydll(6) afunction(int i, int j, int k) ;

PocketC CE API interface:

Edited by - guy on 12/11/2001 08:41:03