-
Notifications
You must be signed in to change notification settings - Fork 4
LabRicecat edited this page Nov 25, 2022
·
1 revision
To output text to the terminal use print
.
print <arg1> <arg2> ... <argn> [(options=value)]
Formatted output is possible by chaining values after each other in a print statement.
Different options can be set by adding a (opt=val)
at the end.
The current options are:
-
end
-> changed the character that gets printed after the statement is finished. Default:\n
new lifes 9
new name "MeowScript"
print "Cats have " lifes " lifes" (end=".\n")
print name " is a cool language!"
This will output as expected:
Cats have 9 lifes.
MeowScript is a cool language!
For user input the command input
is used.
It takes as optional argument a string that get's printed before the user is promted for the input.
The return value is always a string without the newline at the end.
new my_input {input(">>> ")}
print "You inputed: " my_input
Will result in:
>>> user input with stuff
You inputed: user input with stuff