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 - It doesn't work... Problem fixed!
Page 1 of 1

PostPosted: Thu Aug 12, 2004 2:23 am
by IkilledKenny
This problem has been fixed for me... here is the solution. TY Mr. Jeremy Dewey (dewey@orbworks.com) for solving this problem for me.

while (true) {
if (b=="\n") {
break;
}
}

Oh and BTW I looked at my old version of my program... it would seem the my earlier math was wrong and that I have had PocketC for closer to 6 years... I wasn't adding the time that I had it unregistered! So I've had a Palm OS device for nearly 6 years too... man I feel old!

And one other thing... Mr. Jeremy Dewey you are as I promised intitled to a free version of my softwear. I'll contact you about this as soon as I make the inital release. :) I really approve of the service and the quick reply to the email I sent you! :):)

PostPosted: Thu Aug 12, 2004 11:23 am
by Mikael
Perhaps it's just me, but I don't ever remember seeing getc() in Pocket C - desktop version or otherwise. Are you sure you're not trying to use an ANSI C function in your Pocket C program. I looked up the basic input/output for Pocket C and came up with:

<b>puts</b>(string text) - append a string to the output form. Does not add a newline. (To add a newline, add a "\n" to the end of your string).
<b>gets</b>(string prompt) - presents an input dialog with the given string as a prompt. Returns a string if the user pressed OK, or an empty string if the user presses Cancel. The dialog can contain 2 lines of text, use the '\r' character to wrap to the second line.
<b>getsd</b>(string prompt, string defaultValue) - presents an input dialog with the given string as a prompt and a default value in the input field. Returns a string if the user pressed OK, or an empty string if the user presses Cancel. The dialog can contain 2 lines of text, use the '\r' character to wrap to the second line.
<b>getsi</b>(int x, int y, int w, string defaultValue) - presents an input dialog at the x, y coordinates specified, with the given string as a default value. The input dialog will have an edit field of width w (though the dialog will be larger). A string is returned when the user presses OK (there is no cancel option).
<b>getsm</b>(int x, int y, int w, int lines, string defaultValue) - exactly like getsi(), but the edit field created is lines lines tall.
alert(string msg) - pops up an alert dialog with the given text.
<b>confirm</b>(string msg) - pops up an alert dialog with the given text and Yes/No buttons. Returns 1 for Yes, 0 for No.
<b>clear</b>() - clears the output form.

Still, I could be wrong. Anyway, you could try using the <b>gets</b>() function, which may give you better luck as in the following snippet:

//GetString
@cid "GETS";
@ver "1.0";
@dbname "GetString";
@name "GetString";
main(){
string userAns;
int i;
for(i = 0; i<3; i++){
userAns = gets("Please enter something...");
if(userAns == ""){
alert("You didn't enter anything. Bye!");
break;
}
alert("You entered " +userAns);
}
exit();
}


Good luck!

Mikael

PostPosted: Fri Aug 13, 2004 1:46 pm
by Mikael
OK, now I'm with you. I can see where it is in the list of event functions. Sorry.:?

With regard to your question:

How long have you been using PocketC? (<--I don't mean that to sound rude lol. I really wanna know.)

About a year and a half is the answer. It's like this. Just because English may happen to be my mother tongue, doesn't mean that I know every single word or every single grammatical rule. Do you:?:
The <b>getc</b>() function is not something I would normally have any use for, hence my oversight. I mainly use Pocket C to access the features of PToolbox, so I don't know all the functions it offers inside out. I have no problem in admitting when I'm wrong; after all, wasn't it Einstein who said something like 'People who never make mistakes, never learn anything new.[:0]

The last time I looked, this was a Development Discussion forum and not a college entrance exam.

Good luck again and best wishes.;)

Mikael

PostPosted: Fri Aug 13, 2004 2:05 pm
by Mikael
//GetChar
@cid "GETC";
@ver "1.0";
@dbname "GetChar";
@name "GetChar";
main(){

char userAns;
int i;
graph_on();
clearg();
for(i = 0; i<3; i++){
text(5,50,"Enter something in the graffiti area...");
userAns = getc();
if(userAns==(char)10){
alert("You didn't enter anything. Bye!");
break;
clearg();
}
alert("You entered " +userAns);
clearg();
}
exit();
}

Mikael