Language
Input & output
Four built-ins talk to the console. Alana likes to speak in complete sentences, then listen.
| Keyword | Does | Yields |
|---|---|---|
| show | Print, stay on the line | — |
| showln | Print, then a newline — or a blank line, if you just need air | — |
| readln | Read a whole line | str |
| readk | Read one key. One. | schar |
Building a line
A label, then a value, then a newline. Very tidy.
show "Hello "; showln userName; showln;
Reading numbers
readln is always a string. People type words when you wanted digits.
That is not her fault. Parse it:
define num x is parsenum(readln); showln x; readk;
For messy humans, prefer
tryparsenum
in a while not … loop. The kitchen-sink example does this and sighs quietly.