http://edspi31415.blogspot.com/2013/11/hp-prime-programming-tutorial-3-while.html
And a tip from Miguel Toro: (Thanks Miguel!)
http://edspi31415.blogspot.com/2013/11/hp-prime-tip-rpn-and-created-programs.html
Edited: 5 Nov 2013, 10:08 p.m.
HP Prime Programming Tutorial #3: WHILE, INPUT, KILL, REPEAT, GETKEY
|
|
« Next Oldest | Next Newest »
|
▼
11-05-2013, 10:07 PM
http://edspi31415.blogspot.com/2013/11/hp-prime-programming-tutorial-3-while.html And a tip from Miguel Toro: (Thanks Miguel!)
http://edspi31415.blogspot.com/2013/11/hp-prime-tip-rpn-and-created-programs.html Edited: 5 Nov 2013, 10:08 p.m. ▼
11-06-2013, 12:00 AM
Nice post, Eddie. If I may add some notes: It is possible to use INPUT(…) as follows:
IF INPUT(…) THEN // note the lack of ; after the closing ) Also, INPUT can also be given a default value (or list of default values).
INPUT(myvar, "Title", "Prompt", "Help Text", default) When the user uses "Edit" or begins to type their input, they would see the default value appear in the command line. INPUT(…) returns 0 if [On] or [Esc] was pressed and 1 otherwise. Lastly, inputs are not limited to real numbers. However, the input "type" must be set prior to the INPUT(…) command by setting (in this example) myvar to a dummy value of the desired type. For example, if you want a string, then do:
myvar:=""; prior to using the INPUT. Otherwise, you will only be allowed to enter real values for myvar. ▼
11-06-2013, 01:45 AM
hello,
you also talk about key gathering. You could mention the WAIT(0) command. use it on the command line to quickly get a key number. and use it in program rather than a while getkey in order to limit power use. Cyrille
11-06-2013, 08:29 PM
Quote: I think so, I will have to try it. Update at 5:50 PM PST: Yes. Using INPUT in this way works. Thanks, Han.
Edited: 6 Nov 2013, 8:51 p.m. |