Language

Input & output

Four built-ins talk to the console. Alana likes to speak in complete sentences, then listen.

KeywordDoesYields
showPrint, stay on the line—
showlnPrint, then a newline — or a blank line, if you just need air—
readlnRead a whole linestr
readkRead 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.