/** * Constants */ const str nl = "\n"; plex Terminal { nat handle; } /** * Main function */ function main() { Terminal term = open("/dev/term/0", 0); real a = 5.0; do (int i = 5000, 0, -1) { a = a + 5.0; } nat b = a as nat; pln(term, "Enter a string:"); str user_string = read(term, 32); pln(term, a.str); pln(term, b.str); pln(term, user_string); } /** * Print with a newline */ function pln(Terminal term, str message) { write(term, message, message.length); write(term, nl, nl.length); }