keyboard input command in pocketC

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

Postby raveen106 on Wed Mar 24, 2004 2:00 pm

The pocketC language specification gives details on variables, functions,expressions etc, but there is no topic on input/output. For showing output, puts(string) is given. For giving input from keyboard, what is the built-in function?

rav
raveen106
 
Posts: 3
Joined: Sun Mar 21, 2004 11:25 am

Postby Mikael on Wed Mar 24, 2004 4:27 pm

gets(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.

getsd(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.

getsi(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).

getsm(int x, int y, int w, int lines, string defaultValue) ?¢‚Ǩ‚Äú exactly like getsi(), but the edit field created is lines lines tall.

See the 'Built-in Functions' section of the PocketC docs for information about other functions.

Mikael
Mikael
 
Posts: 156
Joined: Sun Apr 13, 2003 9:19 am
Location: Denmark

Postby raveen106 on Thu Mar 25, 2004 1:35 pm

thanks for giving info on input commands

ravi
raveen106
 
Posts: 3
Joined: Sun Mar 21, 2004 11:25 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests

cron