xiranda/test_x.x
2024-04-03 06:10:35 -04:00

50 lines
843 B
Plaintext

type integer = 4;
type natural = 4;
type boolean (
false,
true)
type system_call (
linux_read_system_call = 0,
linux_write_system_call = 1,
linux_open_system_call = 2,
linux_close_system_call = 3,
linux_exit_system_call = 60)
type file_descriptor (
standard_input,
standard_output)
string_length (string):
length: natural = 0;
loop (! string [length])
length++;
return (length);;
echo (text):
system (linux_write_system_call, standard_output, text, string_length (text));
return;;
heyo () echo ("Heyo!");
cyaa () echo ("Cyaa!");
global: integer = 666;
uberglobal = 666;
my_main ():
heyo ();
loop (x = 1 .. 17):
if ((x % 3 = 0) & (x % 5 = 0))
echo ("fizz+buzz");
else if (x % 3 = 0)
echo ("fizz");
else if (x % 5 = 0)
echo ("buzz");
else
echo ("<>");
echo ("\n");;
cyaa ();
return 60;;