Getting input on 28S


I have used the "prompt ->" command on the 48 series for getting input on interactive programs. Is there an equivalent command on the 28S?

Thanks, Bill



just a quick hint: The 28S Owner's Manual has a chapter "Interactive Programs" (pp 234-239)

What comes into my mind is 'HALT'ing the program, then let the user input a value into the stack and press CONT to continue. To make things clear, you can display a message to tell the user what you expect.



Here is a simple example:

<< 0 0 0 -> a b c
<< { STO a b c } MENU
a b c
If you run this little program, you get a menu:
[ a ][ b ][ c ][   ][   ][   ]
You can now enter values like in the solver.

After you press Shift CONT, the values you have entered are displayed on the stack.

While a program is HALTed, its local variables are visible and can be manipulated by the user. Shift CONT resumes program execution where it left off.



I don't think that anything like PROMPT or INPUT is built-in with
the 28 series, but as Marcus noted, the HALT command seems to be
the obvious choice for halting a program to allow user input.

Bill Wickes lists a PROMPT program in HP-28

<< "Enter " SWAP +
Of course, with the above program, the prompt string will always
start with "Enter ".

If you want a program where you specify the complete prompt
string, like the built-in PROMPT command in later RPL models, then
simplify it to:

You could store either of the above in a global variable to be
called by name in other programs, much like a built-in command, or
you could include:
"prompt string" CLLCD 1 DISP HALT
as in-line code in other programs.


Possibly Related Threads...
Thread Author Replies Views Last Post
  INPUT for HP Prime Eddie W. Shore 3 1,007 11-17-2013, 04:46 PM
Last Post: Michael de Estrada
  HP Prime Tutorial #4 is up (CASE/CHOOSE/INPUT) Eddie W. Shore 1 798 11-15-2013, 07:32 AM
Last Post: Davi Ribeiro de Oliveira
  HP Prime Programming Tutorial #3: WHILE, INPUT, KILL, REPEAT, GETKEY Eddie W. Shore 5 1,439 11-07-2013, 12:25 AM
Last Post: Han
  minor visual bug in INPUT Han 0 600 10-03-2013, 01:13 PM
Last Post: Han
  Input syntax on the Prime Gilles Carpentier 6 1,370 08-23-2013, 04:31 AM
Last Post: Gilles Carpentier
  Input CAS var on HP Prime Mic 2 846 08-22-2013, 02:29 PM
Last Post: Mic
  HP 85 Serial Interface; INPUT Example? inaki 1 772 06-12-2013, 11:09 PM
Last Post: Paul Berger (Canada)
  HP33E how to input numbers RalfGeiger 6 1,283 05-07-2013, 02:41 PM
Last Post: Ron Ross
  HP 35s - multiple program input values? Arno 3 1,063 04-29-2013, 11:27 AM
Last Post: Gerson W. Barbosa
  Riemann's Zeta Function (HP-28S) Gerson W. Barbosa 8 1,662 02-03-2013, 03:23 PM
Last Post: Gerson W. Barbosa

Forum Jump: