Omnimaga

Calculator Community => TI Calculators => TI-BASIC => Topic started by: Munchor on October 16, 2010, 12:19:23 pm

Title: NSpire Input
Post by: Munchor on October 16, 2010, 12:19:23 pm
Hey there, I know how to get input from the user like this:

Code: [Select]
Define LibPub cube(n)=
Prgm
Disp n, " ao cubo e igual a ", n^3
disp "by David"
EndPrgm

A small program made in portuguese.

I get the input from the user, because the user has to type:

Code: [Select]
cube(n)
I want another way to get input, like a box, where they enter a number or like a flashing cursor and they enter the value.

Thanks much!!
David
Title: Re: NSpire Input
Post by: bwang on October 16, 2010, 12:25:04 pm
I think there's some dialog functions for that. I've never used Nspire OS 2.x, so I do not know what they are.
Title: Re: NSpire Input
Post by: Munchor on October 16, 2010, 12:26:40 pm
I think there's some dialog functions for that. I've never used Nspire OS 2.x, so I do not know what they are.

I've seen some dialog functions too, that's exactly what I want :)
Title: Re: NSpire Input
Post by: fb39ca4 on October 16, 2010, 01:16:36 pm
If you go to the menu in the program editor, and go to I/O, there should be two functions, one for inputting numbers and the other for strings. I forgot the syntax, if you find those in the catalog, it should have the syntax near the bottom of the window.
Title: Re: NSpire Input
Post by: DJ Omnimaga on October 16, 2010, 02:44:50 pm
Wasn't it something like Request() and RequestStr()? I'm not sure anymore.
Title: Re: NSpire Input
Post by: kyllopardiun on October 16, 2010, 02:52:19 pm
up to now I've seen strings only in the function/prgm("hereismystring1","hereismystring2",...)
but not in the middle of the program to get strings...
Title: Re: NSpire Input
Post by: shrear on October 16, 2010, 03:30:48 pm
Wasn't it something like Request() and RequestStr()? I'm not sure anymore.

Its: Request "x",a
Or for Strings: RequestStr "x",a
x is the message which is displayed
a is the name of the new variable which is given a value



up to now I've seen strings only in the function/prgm("hereismystring1","hereismystring2",...)
but not in the middle of the program to get strings...

You can use it par example like this

...
RequestStr "Name",name
...
Text "As the dusk arrived you heard someone shout"&name&",irritated you turned around..."
...

hope this doesn't sound to educational
Title: Re: NSpire Input
Post by: Munchor on October 16, 2010, 04:26:08 pm
Thanks everyone! It works, request works :)
Title: Re: NSpire Input
Post by: kyllopardiun on October 16, 2010, 11:36:45 pm
Wasn't it something like Request() and RequestStr()? I'm not sure anymore.

Its: Request "x",a
Or for Strings: RequestStr "x",a
x is the message which is displayed
a is the name of the new variable which is given a value



up to now I've seen strings only in the function/prgm("hereismystring1","hereismystring2",...)
but not in the middle of the program to get strings...

You can use it par example like this

...
RequestStr "Name",name
...
Text "As the dusk arrived you heard someone shout"&name&",irritated you turned around..."
...

hope this doesn't sound to educational

Nice to know about it (=
Title: Re: NSpire Input
Post by: DJ Omnimaga on October 17, 2010, 02:32:45 am
Wasn't it something like Request() and RequestStr()? I'm not sure anymore.

Its: Request "x",a
Or for Strings: RequestStr "x",a
x is the message which is displayed
a is the name of the new variable which is given a value



up to now I've seen strings only in the function/prgm("hereismystring1","hereismystring2",...)
but not in the middle of the program to get strings...

You can use it par example like this

...
RequestStr "Name",name
...
Text "As the dusk arrived you heard someone shout"&name&",irritated you turned around..."
...

hope this doesn't sound to educational
Cool thank you for the info. I did not use OS 2.x and above a lot (the only OSes to have Request) so I wasn't too sure. Most of the time my TI-Nspire is in 84 mode and when it isn't I use OS 1.1.
Title: Re: NSpire Input
Post by: kyllopardiun on October 17, 2010, 11:25:13 am
Cool thank you for the info. I did not use OS 2.x and above a lot (the only OSes to have Request) so I wasn't too sure. Most of the time my TI-Nspire is in 84 mode and when it isn't I use OS 1.1.

Now I got, why it don't work in my calc ...
This is so far the first  advantage of 2.x that I know up to know.
And I will keep my trusty 1.7 :D
Title: Re: NSpire Input
Post by: Munchor on October 17, 2010, 11:50:37 am
2.x OS sucks, I want 1.1 :( NDLESS!!!

I have 1.1, but with the touchpad nspire I can't downgrade :'(
Title: Re: NSpire Input
Post by: fb39ca4 on October 17, 2010, 12:13:39 pm
If you're fine with your calc looking weird, you could buy the clickpad from TI ($10), and then use OS 1.1.
Title: Re: NSpire Input
Post by: kyllopardiun on October 17, 2010, 12:28:35 pm
If you're fine with your calc looking weird, you could buy the clickpad from TI ($10), and then use OS 1.1.

$10?
I would buy one for that price...
Title: Re: NSpire Input
Post by: Munchor on October 17, 2010, 12:29:50 pm
If you're fine with your calc looking weird, you could buy the clickpad from TI ($10), and then use OS 1.1.

$10?
I would buy one for that price...

So would I
Title: Re: NSpire Input
Post by: fb39ca4 on October 17, 2010, 12:34:39 pm
Sorry if I was unclear, this is just the keypad, not the rest of the calc.
Title: Re: NSpire Input
Post by: Munchor on October 17, 2010, 12:35:39 pm
I would pay up to 20$ for a clickpad.

The ti 84 plus keyboard is free in portugal
Title: Re: NSpire Input
Post by: kyllopardiun on October 17, 2010, 12:44:56 pm
Sorry if I was unclear, this is just the keypad, not the rest of the calc.
Ok, I thought you really was able to buy the calc for that unbelievable price...


I would pay up to 20$ for a clickpad.

The ti 84 plus keyboard is free in portugal
Well, normally it's free only for the clickpad...
Title: Re: NSpire Input
Post by: Munchor on October 17, 2010, 12:46:03 pm
This has gone way too far from "Ti Nspire input", we should create a thread to discuss ndless and OS and Clickpad and stuff, not here