INPUT for HP Prime



#2

Since the INPUT can take multiple variables (unlike the 39gii and its predecessors), the command becomes actually useful, like the 50g's INFORM.

INPUT(list of variables, "title string", list of prompts, optional list of help strings, optional list of initial values);


#3

Quote:
Since the INPUT can take multiple variables (unlike the 39gii and its predecessors), the command becomes actually useful, like the 50g's INFORM.

INPUT(list of variables, "title string", list of prompts, optional list of help strings, optional list of initial values);


To clarify, the list of "initial values" is actually a list of "default values" when the "Edit" menu option is selected. The initial values are whatever is already stored in the list of variables, and is what is shown inside the input box. The default values are what will be seen on the command line when the user proceeds to change the value of the input box.

For example, if A=2, then

INPUT(A, "Title", "A=", "Enter A", -1)

will show A=2, but when the user presses "Edit" they will see -1 in the command line. The -1 will never be seen if the user simply starts typing in a new value for A (it's only visible via "Edit").


#4

Good point - the values of an INPUT default to zero (I think) if nothing is entered, despite initial values.


#5

My experience is that global variables retain their previous value if they are not re-entered with an INPUT statement.


Possibly Related Threads...
Thread Author Replies Views Last Post
  HP Prime Tutorial #4 is up (CASE/CHOOSE/INPUT) Eddie W. Shore 1 175 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 323 11-07-2013, 12:25 AM
Last Post: Han
  minor visual bug in INPUT Han 0 105 10-03-2013, 01:13 PM
Last Post: Han
  Input syntax on the Prime Gilles Carpentier 6 296 08-23-2013, 04:31 AM
Last Post: Gilles Carpentier
  Input CAS var on HP Prime Mic 2 159 08-22-2013, 02:29 PM
Last Post: Mic
  HP 85 Serial Interface; INPUT Example? inaki 1 165 06-12-2013, 11:09 PM
Last Post: Paul Berger (Canada)
  HP33E how to input numbers RalfGeiger 6 272 05-07-2013, 02:41 PM
Last Post: Ron Ross
  HP 35s - multiple program input values? Arno 3 234 04-29-2013, 11:27 AM
Last Post: Gerson W. Barbosa
  Mini-challenge: HHC2012 RPL programming contest with larger input David Hayden 14 558 10-05-2012, 10:36 PM
Last Post: David Hayden
  HP42s input output of programs and files aurelio 17 558 09-01-2012, 10:18 PM
Last Post: Raymond Del Tondo

Forum Jump: