Print Topic - Archive

BlueCrimson Ti Calculator Forum  /  Ti-Nspire  /  Prompt
Posted by: insertnamehere, March 14, 2008, 6:30pm
Question:

How do I prompt a user to define a variable?  i.e. to display the phrase "Enter an integer" and have whatever the user inputs define the variable for the program.

I do have the latest updated version of the operating system.
Posted by: fryedsoft, March 16, 2008, 2:31am; Reply: 1
You cant. This is one of the big problems with the NSpire right now and is one of the big reasons why I don't have one. There are ways around it as you can see below, but they are not the best. Lately, it seems like Ti is finally coming to their senses and are adding programming support in the NSpire, but the latest firmware has limited programming support that still borders on functions instead of full blown programs. They still have a long way to go before the NSpire can run programs like an 89 or an voyage 200.

Anyway, this is what the nspire handbook recommends. It's not the best way but it's the only way until they add input support to the NSpire programming language. Presonally, I'd go with option 3.

Quoted from The Ti-Nspire Handbook
To input values into a function or program, you can:

• Require users to store values to specific variables beforehand. The object can then refer to these variables

Define calculatearea()=
Prgm
area:=wt*ht
EndPrgm

• Embed the values directly in the object itself

Define calculatearea()=
Prgm
wt:=3
ht:=23
area:=wt*ht
EndPrgm

• Use parameters in the definition. This lets users pass one or more values as arguments to the object when they use it.

Define calculatearea(wt,ht)=
Prgm
area:=wt*ht
EndPrgm
Print page generated: March 27, 2023, 10:12pm