undar-lang/test/simple.ul

29 lines
354 B
Fortran

/**
* Constants
*/
const str nl = "\n";
plex Terminal {
nat handle;
init() {
handle = open("/dev/term/0", 0);
}
}
/**
* Main function
*/
function main() {
pln((1 + 2).str);
}
/**
* Print with a newline
*/
function pln(str message) {
Terminal term();
write(term, message, message.length);
write(term, nl, nl.length);
}