Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3368: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3370: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3371: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3372: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
OrbWorks Community Forum • View topic - stdio.h

stdio.h

Discuss PocketC for Palm OS (including Desktop Edition)

Postby bricktop on Tue Mar 13, 2001 8:58 pm

im a begining programer and my class at school uses this header primarily. what would you guys advise be the easiest way to get into pocketc?
bricktop
 
Posts: 3
Joined: Tue Mar 13, 2001 8:57 pm

Postby stephane on Wed Mar 14, 2001 1:20 am

At the Orbworks homepage, follow the link to the "Palm OS docs", and review the documentation to see how PocketC is different than standard C.

PocketC doesn't use standard C library headers, it has its own built-in I/O functions, again listed in the docs. You would need to replace the standard C function with an equivalent one in PocketC.

As an example, the standard "hello, world" program in C looks something like this:
<pre id=code><font face=courier size=2 id=code>
#include "stdio.h"

main() {
printf("hello, world!\n");
}
</font id=code></pre id=code>
In PocketC it would be more like the following:
<pre id=code><font face=courier size=2 id=code>
main() {
puts("hello, world!\n");
}
</font id=code></pre id=code>
Two main differences: no include needed, and 'puts' is used instead of 'printf'.

Good luck <img src=icon_smile.gif border=0 align=middle>


St?ɬ©phane
Stéphane
stephane
 
Posts: 71
Joined: Fri Jan 12, 2001 3:16 am
Location: Canada

Postby bricktop on Wed Mar 14, 2001 2:24 am

Alright, that should help. Just one more, what would the pocketc equal to the scanf command be?
bricktop
 
Posts: 3
Joined: Tue Mar 13, 2001 8:57 pm

Postby Thad on Wed Mar 14, 2001 8:02 am

You might find the following helpful:

the ANSI C Standard Library for PocketC on the PalmOS
(or as close to it as is humanly possible)
(c) T.Frogley 2000

http://www.photo.net/users/Thad/pclib/



Thad
Thad
Thad
 
Posts: 33
Joined: Thu Feb 22, 2001 10:27 am
Location: United Kingdom

Postby wolfgang on Wed Mar 14, 2001 3:52 pm

Hello,

the substitute for "scanf" is "gets"; it returns a string with the user input. Look at the documentation section on http://www.orbworks.com to get the full syntax.

Another BIG advantage of PocketC is that it knows a data type "string" which is a variable length text string. No need to mess around with arrays of char's <img src=icon_smile.gif border=0 align=middle>

Wolfgang
Composing music on the PocketPC! - http://www.pdamusician.com
wolfgang
 
Posts: 281
Joined: Tue Dec 12, 2000 4:22 am
Location: USA

Postby bricktop on Wed Mar 14, 2001 10:53 pm

could you send me a link to the .prc
file for the pclib library please?
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
You might find the following helpful:

the ANSI C Standard Library for PocketC on the PalmOS
(or as close to it as is humanly possible)
(c) T.Frogley 2000

http://www.photo.net/users/Thad/pclib/



Thad
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
bricktop
 
Posts: 3
Joined: Tue Mar 13, 2001 8:57 pm

Postby stephane on Thu Mar 15, 2001 2:21 am

Brick,

There is no prc file, the library is a collection of source code files that you can include in your PocketC projects, to make them "somewhat" ANSI C compatible.


St?ɬ©phane
Stéphane
stephane
 
Posts: 71
Joined: Fri Jan 12, 2001 3:16 am
Location: Canada


Return to PocketC for Palm OS

Who is online

Users browsing this forum: No registered users and 1 guest

cron