3: Getting user input on the command line, and printing - Asterisk007/prse GitHub Wiki
Terminal I/O in PRSE uses the following syntax:
use "io"
func main() {
print("Enter a number? ");
let a_number: int = 0;
get_input(a_number);
println("That's " + a_number$string);
}
| Function | get_input() |
|---|---|
| Usage |
get_input(variable, ...);, Where ... indicates 0 or more additional variables. Variables passed to this call may be of any primitive type. |
| Function |
print();println();
|
|---|---|
| Usage |
print(...);, println(...);, Where ... indicates 1 or more strings or variables. You may also specify raw data. |