xiranda/test_x.x

55 lines
1.1 KiB
Plaintext
Raw Normal View History

2024-04-01 07:23:49 -04:00
--- Heyo
type boolean (false, true)
type character = -128 .. 127;
type integer = -2000000000 .. 2000000000;
type natural % 2000000000;
type structure (
a: integer = 0;
b: boolean = false;
c: natural = 0)
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 = 0,
standard_output = 1)
main () > integer:
x: integer = 1;
s: structure = (-1, true, 1);
loop (x++ < 101):
if ((x % 3 = 0) && (x % 5 = 0))
echo ("fizzbuzz");
else if (x % 3 = 0):
echo ("fizz\n");
echo ("and again fizz");;
else if (x % 5 = 0)
echo ("buzz\n");
else:
echo ("fuck formatting...");
echo ("fuck formatting twice...");;
echo ("\n");;
return (0);;
heyo () echo ("Heyo!");
cyaa () echo ("Heyo!");
name () > characer [] return ("Ognjen");
string_length (character string []) > natural:
length: natural = 0;
loop (! string [length])
length++;
return (length);;
echo (character text []):
system (linux_write_system_call, standard_output, text, string_length (text));
return;;