INPUT/OUTPUT

RC BASIC has two ways of getting output to a text console. The first way is the PRINT keyword shown here:

Print "HELLO WORLD" 
Print 5 

You can also use a ";" to output multiple values or to prevent PRINT from going to a new-line in its output.

Print "This is line 1. "
Print "This is still line 1. Value="4+5" This is the end of line 1" 
Print "Line 2 start" 

You can also use the FPrint() sub routine to do the same thing as PRINT. It was added back in RCBasic v1.0 since PRINT was not able to stop new-line after its output back then. This is a legacy hold over and does not really add any new functionality.

To get input from the user you would use the INPUT$ function. INPUT$ will display a prompt to the user and then get input from the console.

USER_NAME$ = INPUT$("WHAT IS YOUR NAME? ") 

The above example will ask the user WHAT IS YOUR NAME? and then store whatever the user types in into the variable USER_NAME$.