[help] input cmd - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: HP Prime (/forum-5.html) +--- Thread: [help] input cmd (/thread-7036.html) |
[help] input cmd - compsystems - 10-14-2016 01:43 AM Hello, the following code inquire two independent values each individually with INPUT CMD, the problem is that every time a value [ok] is entered the dialog box closes. the idea is to use the terminal view to show to request and input cmd to enter it What I can do, to hold the dialog box? Thank you PHP Code: export testInput() in RPL the dialog box is retained. PHP Code: « RE: [help] input cmd - cyrille de brébisson - 10-14-2016 08:15 AM Hello, If your aim is to have a dialog box that takes inputs, and also display outputs (kind of like in a circular manner), the only way is to use the OK button to let the user tell you that he is done. Do your calculations (which will update the variables), and restart the input box. Something along the lines of: while 1 do if not input(A) then break; end; A:= A+1; end; Cyrille RE: [help] input cmd - compsystems - 10-14-2016 02:20 PM Thanks Cyrille PHP Code: export testInput() It is a good trick =) Code: while true do if NOT( input( x2 )) then break; end; end; Code: if NOT( input( x1 ) ) then kill; end; I think the INPUT command for a single entry, the [OK] button should not execute the box, simply enter the data, a second [ok] executes it, just as is done with INFORM (HP48 / 50). For multiple inputs [OK] button should to jump to the next entry if NOT( input( { x3, x4 } ) ) then kill; end; Another option or idea is add a new submenu [Edit] [] [] [] [cancel] [ok] (current)-> [Edit] [ok] [] [] [cancel] [exe] Good ideas? PD: In the above code is required not in capital letters, I would like to accept it also in small letters for next uptated of firmware There is a command to print without skip line? PRINT_LINE I want to show the out, immediately after the input message. print("Enter x2 value > ") Enter x2 value > 8 and not Enter x2 value > 8 RE: [help] input cmd - compsystems - 10-14-2016 02:57 PM the third element and ... or parameter may be empty and automatically INPUT cmd adds identifiers and help string PHP Code: input({x1,x2},"input test", {}, {"Enter value for x1","Enter value for x2"} ); PHP Code: input({x1,x2},"input test", {"x1:","x2:"}, {"Enter value for x1","Enter value for x2"} ); PHP Code: input({x1,x2},"input test", {}, {} ); PHP Code: input({x1,x2},"input test" ); |