some body can help me??

11 views
Skip to first unread message

Cristian Salazar

unread,
Mar 10, 2008, 3:33:37 PM3/10/08
to Sysquake
hi, everybody, i'm from chile, and i newbie here... so i hope could
get some usefull help.
the thing is this:

i'm starting programming in Lyme enviroment (PALM), and i've made some
stuff; functions...
but i need to know how is posible to get an answer from keyboard, like
in console with C

example=

int r;
printf("Enter the radius of circle: ");
scanf("%d",&r);
printf("The radius of circle is: %d",r);

i want to do something like that in the lyme. i guss this is very
simple, but i can't
i try this:

line=fgets(0) --->obvious this is incorrect, the zero is 'cos i read
that 0 is Standar input from keyboard

that is all. see u later

PS: so sorry, i know my english isn't really good. i'll be wating
for..

Yves Piguet

unread,
Mar 10, 2008, 4:49:32 PM3/10/08
to Sysquake
Hi,

Function "scanf" doesn't exist; use "fscanf" instead (same as with
"fprintf"
which should be used fror "printf"). The file descriptor for standard
input is
0, which is also the default value. Finally, results are returned in a
single
column vector as the function output argument.

Try

r = fscanf('%d')

or

r = fscanf(0, '%d')

Tap the OK button when you've entered a number.

Also

line = fgets(0)

should work (it does for me).

Hope this helps,

Yves

ZARATUSTRA

unread,
Mar 10, 2008, 11:07:02 PM3/10/08
to sysq...@googlegroups.com
wow.
great answer.
i was lookin for that

thank u.

Yves .... male or female???
how ever thank again.


--
"Soy la gota que anuncia la tormenta..."
Reply all
Reply to author
Forward
0 new messages