Collecting User Input From The Console Window

Hi,I know that there are many interfaces for other languages to send userinput to a q application.However, to keep things simple for me, I just want to deal with userinput on the command line of the console screen. (q is my firstattempt at learning a language, other than my native English)So, I would like to know: how do I write to the console screen andaccept user input from the console, while in a q session?I know that I can pass arg’s at boot-up when starting a q app… but Iwant to do it while the q session is running. (I also know that I canedit the q script, alter the existing arguments and load the newscript while a session is running, but I want it to be a screenoperation)For instance, I am building a simple market-data generator. Nothingfancy, just a zero-drift martingale with constant volatility. It spitsout a simulated time-series at regular intervals and writes the id,date, time and price to a table which is able to be displayed on theconsole screen. After the table gets to be a certain size it rolls thedata off the top of the screen in FIFO fashion and adds the new dataat the bottom.At the moment, the volatility and period length for data generationare set as constants.I want to be able to change them at any time, including during thesession.If anyone knows how to write to the console screen and collectsomething like:…Enter Volatility [.20] : _ .40Enter Period Length [250] : _ 12Thank-you For Your Variables! The Program Will Take Good Care OfThem…Such that I can print those messages to the screen and…wait, on thesame line… for the input response and capture those values for lateruse in the app.As a practical exercise in helping me to learn and better understandthis language, this app will be my pseudo ticker-plant. I will run iton a local server session and have it send data to the local clientsubscriber session using inter-process communication.Later, I will add my stochastic volatility algorithm, randomize theprice/trade frequency and introduce multiple, simultaneous time-series.Thanks for any assistance,Q.

Input:{ -2 x; read0 0}
f:“F”$Input"enter a float: "

Sent from my iPhone

Yes! It works…Thank-you Timothy, your code is very helpful and appreciated.Special thanks to your iPhone. :)Q.