Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker!ira.uka.de!sun1.ruf.uni-freiburg.de!horlache From: horlache@sun1.ruf.uni-freiburg.de (Ullrich Horlacher) Newsgroups: comp.sys.handhelds Subject: Re: some prgs Message-ID: <1990Jan17.192722.29226@sun1.ruf.uni-freiburg.de> Date: 17 Jan 90 19:27:22 GMT References: <1990Jan17.182205.27187@sun1.ruf.uni-freiburg.de> Distribution: comp Organization: Rechenzentrum der Universitaet Freiburg, Deutschland Lines: 68 IN is a programm for interactive input, like INPUT in BASIC or readln in Pascal. It gives back the input-string to the stack. If you press the INS-key, you can do other things, like visit variables, and then continue the programm. Insert the special characters ":" and "_" with my programm REPL (or with other methods). IN ! remarks << -> s p << s "" <> s ":" + s IFTE 's' STO ! If prompt-string then add a ":" WHILE IFERR DO ! loop with pseudo-interrupt-handling s OVER + ! Add prompt-string "_" + p ->IN ! get char (cursor on) s OVER + ! Add prompt-string p ->IN ! get char (cursor off) UNTIL 0 END THEN END ! end interrupt-loop DUP "ENTER" <> ! do not terminate IN ? REPEAT DUP "INS" == ! if key INS is pressed << DROP2 LCD-> 'lcd' STO ! save current screen HALT ! spawn 2nd process "" "" lcd ->LCD lcd PURGE >> ! refresh screen IFT DUP "BACK" == ! if the <- key is pressed << DROP 1 OVER SIZE 1 - SUB ! delete last char "" >> IFT + ! add char END DROP DUP s SWAP + p DISP ! display input-string without cursor >> >> ->IN ! sub-programm for blinking cursor << DISP ! display input-string 1 40 START KEY ! loop for getting key to '->IN' IFT ! create an error for pseudo-interrupt- NEXT ! handling and resuming main-programm IN >> use: 2: 1: IN e.g.: 2: "Value" 1: 3 IN or << CLLCD "Value" 3 IN 'VALUE' STO >> ==> +----------------------+ | | |Value:_ | | | | | +----------------------+ #---------------------------------------------------------------------# # this mail came from Framstag! (sometimes known as Ulli Horlacher) # # framstag@dtupev5a.bitnet ullrich.horlacher@ruf.uni-freiburg.dbp.de # # "Murphy was an optimist" # #---------------------------------------------------------------------#