Post Reply 
Mixing input and output in a Prime program
09-23-2024, 06:03 AM
Post: #4
RE: Mixing input and output in a Prime program
(09-23-2024 05:02 AM)komame Wrote:  Besides the INPUT command, there is also the READLINE command, which allows the user to input in a separate line at the very bottom of the terminal screen. This way, the terminal is not hidden.

Code:
EXPORT USERINPUT()
BEGIN
  LOCAL bet;
  PRINT("How much do you want to bet?");
  bet:=READLINE();
  PRINT("You have bet " + bet);
END;

The READLINE command returns a string, so in your case, you need to convert the input to an integer.

Perfect! Thank you - this is exactly what I was looking for.

Chris
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Mixing input and output in a Prime program - CheshireChris - 09-23-2024 06:03 AM



User(s) browsing this thread: 1 Guest(s)