2024-03-31 22:58:48 -04:00
|
|
|
--- Heyo
|
|
|
|
|
|
|
|
type boolean (false, true)
|
|
|
|
|
|
|
|
type character = -128 .. 127;
|
|
|
|
type integer = -2000000000 .. 2000000000;
|
|
|
|
type natural % 2000000000;
|
|
|
|
|
2024-04-01 07:23:49 -04:00
|
|
|
type structure (
|
|
|
|
a: integer = 0;
|
|
|
|
b: boolean = false;
|
|
|
|
c: natural = 0)
|
2024-03-31 22:58:48 -04:00
|
|
|
|
|
|
|
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)
|
|
|
|
|
2024-04-03 04:31:51 -04:00
|
|
|
heyo () echo ("Heyo!");
|
|
|
|
cyaa () echo ("Heyo!");
|
|
|
|
|
|
|
|
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;;
|
|
|
|
|
|
|
|
--- entry point
|
|
|
|
|
|
|
|
my_main () > integer:
|
2024-04-01 07:23:49 -04:00
|
|
|
x: integer = 1;
|
|
|
|
s: structure = (-1, true, 1);
|
2024-04-03 04:31:51 -04:00
|
|
|
---
|
|
|
|
heyo ();
|
|
|
|
loop (x++ < 17):
|
2024-03-31 22:58:48 -04:00
|
|
|
if ((x % 3 = 0) && (x % 5 = 0))
|
2024-04-01 07:23:49 -04:00
|
|
|
echo ("fizzbuzz");
|
2024-03-31 22:58:48 -04:00
|
|
|
else if (x % 3 = 0):
|
|
|
|
echo ("fizz\n");
|
2024-04-01 07:23:49 -04:00
|
|
|
echo ("and again fizz");;
|
2024-03-31 22:58:48 -04:00
|
|
|
else if (x % 5 = 0)
|
|
|
|
echo ("buzz\n");
|
2024-04-02 11:36:20 -04:00
|
|
|
else
|
2024-04-01 07:23:49 -04:00
|
|
|
echo ("fuck formatting...");
|
|
|
|
echo ("\n");;
|
2024-04-03 04:31:51 -04:00
|
|
|
cyaa ();
|
2024-04-02 18:24:35 -04:00
|
|
|
return 0;;
|