Page 1 of 1

PostPosted: Mon May 13, 2002 9:23 pm
by Eric Delapierre
Hello, i am learning the pocket C.
I don't understand why this code doesn't run...Someone could help me?
//pen
//x for the pen
main (){
clic() {
int cox;
penx();
cox=penx();
puts(cox);
waitp();
}
waitp();
clic();
}
Pocket c give me this mistake :
File:pen
Line:5
undeclared identifier...
i don't understand...
Thxs for your response.

Eric.

PostPosted: Mon May 13, 2002 10:35 pm
by WauloK
Don't declare a function inside a function.

Try:
//pen
//x for the pen
clic() {
int cox;
penx();
cox=penx();
puts(cox);
waitp();
}


main (){
clic();
}


That will output the Stylus' X position when you tap on the screen.

Funky groovy PocketC support site.
http://pocketc.bangrocks.com/
Iron Filings v2.0 released.
Download a demo version at http://www.palmgear.com
Made with PocketC!

PostPosted: Tue May 14, 2002 10:18 am
by Eric Delapierre
Thxs !!!
I understand my mistake, now.:-)
thanks very much!

Eric.