Output:
Disclaimer 1: I don't speak Latgalian at all, so feel free to make corrections. Also, feel free to contribute to the code or language.
Disclaimer 2:This is a silly "compiler" that transforms the catgalian input into JavaScript and runs eval() to display the output on the website. It took around 30 minutes to make, so it is not intended to be serious. However, I do plan to expand Catgalian as a fully functional language in the near future!
>>> Keywords <<<
Control Structures
-
ja
: if statement.ja (x > 0) { drukāt("Pozitīvs"); }
-
cytaiz
: else statement.ja (x > 0) { drukāt("Pozitīvs"); } cytaiz { drukāt("Negatīvs"); }
-
cikom
: while loop.cikom (i < 10) { drukāt(i); i++; }
-
par
: for loop.par (i = 0; i < 10; i++) { drukāt(i); }
-
puortraukums
: break statement. -
turpynuot
: continue statement.
Functions
-
funkceja
: Declares a function.funkceja skaitīt(a, b) { atgrīzt a + b; }
-
atgrīzt
: Returns a value from a function.
Data Types
cypars
:number
vuords
:string
tukšums
:void
Input/Output
-
drukāt
: Outputs text.drukāt("Loba Dīna!");
-
laseit
: Reads user input.cypars vecums = laseit("Īroksti vacumu:");
Operators
- Logical:
&&
,||
,!
- Arithmetic:
+
,-
,*
,/
,%
- Comparison:
==
,!=
,<
,>
,<=
,>=