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 - Error Message

Error Message

Postby croane on Thu Jan 10, 2002 3:26 am

I am following a tutorial but after typing in the program I get the message "unkown data type". Keep in mind I am very new to this. Here is the beginning program
//main()
{
string name;
showconsole();
name = gets ("Enter your name);
puts("Hello ");
puts(name);
}

The problem is on line 2 of this program. Why is this happening. Is the tutorial wrong?

Any help would be appreciated.
Thanks
Croane



Clinton Roane
Clinton Roane
croane
 
Posts: 5
Joined: Thu Jan 10, 2002 3:18 am
Location: USA

Postby ggravier on Thu Jan 10, 2002 4:59 am

Actually, you have it mostly wrong...

1) <b>//main()</b> is not correct. <b>main</b> is the name of the main function. It is not a comment.

2) <b>showconsole</b> is not a <i>PocketC</i> function.

3) I've updated the <b>puts</b> line to take advantage of <i>PocketC</i> syntax.

The result is:
<font face=Courier New>
<B>
// Test
main()
{
string name;
name = gets ("Enter your name");
alert("Hello "+name);
}
</B>
</font id=Courier New>

<b>alert</b> outputs a string in a pop-up, whereas <b>puts</b> outputs it in the console output area... not as nice looking. And <i>PocketC</i> does nice string operations... to make it easy.

Gilles.


-- Gilles Gravier = Gilles@Gravier.org = http://www.gravier.org/ --
PGP Key ID: 0x8DE6D026 ICQ: 77488526
"Chastity is its own punishment." (Solomon Short) [David Gerrold]
-- Gilles Gravier = Gilles@Gravier.org = http://www.gravier.org/ --
PGP Key ID: 0x8DE6D026 ICQ: 77488526
"Chastity is its own punishment." (Solomon Short) [David Gerrold]
ggravier
 
Posts: 6
Joined: Thu Jan 10, 2002 4:37 am
Location: Switzerland

Postby wolfgang on Thu Jan 10, 2002 3:19 pm

Hi,

showconsole IS a PocketC command. But one from the WindowsCE version, not the Palm version. I assume croane is going through the tutorial on my webpage, and this was written for the WindowsCE version. I have, hoewever, also posted a page there about what has to change to make it usable for the Palm version.

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


Return to PocketC for Palm OS KB

Who is online

Users browsing this forum: No registered users and 2 guests

cron