undar-lang/bench/loop.ul

22 lines
347 B
Fortran

Device term("/dev/term/0");
str new-line = "\n";
fn1 main() {
real a = 5.0;
do (int i = 5000, 0, -1) {
a = a + 5.0;
}
nat b = a as nat;
pln("Enter a string:");
str32 user_string = term.read();
pln(a.str);
pln(b.str);
pln(user_string);
}
fn1 pln(str string) {
term.write(string);
term.write(new-line);
return;
}