Discuss topics that apply across the products, such as the PocketC language, or development in general

Postby maurub on Mon Dec 10, 2001 6:41 pm

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.
Posts: 17
Joined: Thu May 31, 2001 5:44 pm
Location: Mexico

Postby wolfgang on Mon Dec 10, 2001 9:07 pm

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.

Composing music on the PocketPC! -
Posts: 281
Joined: Tue Dec 12, 2000 4:22 am
Location: USA

Postby guy on Tue Dec 11, 2001 2:36 pm

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
PocketC CE API interface:
PCForm and CE API forum:
Posts: 879
Joined: Thu Dec 07, 2000 8:58 am
Location: United Kingdom

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest