Author Topic: NSpire Input  (Read 6970 times)

0 Members and 1 Guest are viewing this topic.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
NSpire Input
« 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

Offline bwang

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 634
  • Rating: +30/-11
    • View Profile
Re: NSpire Input
« Reply #1 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.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: NSpire Input
« Reply #2 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 :)

Offline fb39ca4

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1749
  • Rating: +60/-3
    • View Profile
Re: NSpire Input
« Reply #3 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.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: NSpire Input
« Reply #4 on: October 16, 2010, 02:44:50 pm »
Wasn't it something like Request() and RequestStr()? I'm not sure anymore.
Dream of Omnimaga

Offline kyllopardiun

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 178
  • Rating: +14/-4
  • Kyllopardiun over 2000 results in google.
    • View Profile
    • Kyllo's blog (a blog about poetry, videos and computing)
Re: NSpire Input
« Reply #5 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...
« Last Edit: October 16, 2010, 02:52:40 pm by kyllopardiun »

Offline shrear

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 193
  • Rating: +17/-0
    • View Profile
Re: NSpire Input
« Reply #6 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

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: NSpire Input
« Reply #7 on: October 16, 2010, 04:26:08 pm »
Thanks everyone! It works, request works :)

Offline kyllopardiun

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 178
  • Rating: +14/-4
  • Kyllopardiun over 2000 results in google.
    • View Profile
    • Kyllo's blog (a blog about poetry, videos and computing)
Re: NSpire Input
« Reply #8 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 (=

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: NSpire Input
« Reply #9 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.
Dream of Omnimaga

Offline kyllopardiun

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 178
  • Rating: +14/-4
  • Kyllopardiun over 2000 results in google.
    • View Profile
    • Kyllo's blog (a blog about poetry, videos and computing)
Re: NSpire Input
« Reply #10 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

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: NSpire Input
« Reply #11 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 :'(

Offline fb39ca4

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1749
  • Rating: +60/-3
    • View Profile
Re: NSpire Input
« Reply #12 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.

Offline kyllopardiun

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 178
  • Rating: +14/-4
  • Kyllopardiun over 2000 results in google.
    • View Profile
    • Kyllo's blog (a blog about poetry, videos and computing)
Re: NSpire Input
« Reply #13 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...

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: NSpire Input
« Reply #14 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