HP Forums

Full Version: INPUT for HP Prime
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

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);

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").

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

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