!Romanian
Jump to navigation
Jump to search
!Romanian is a esolang made by Mihai Popa. It's taken from the pseudocode language in many Romanian code books, but altered slightly.
Syntax
The syntax is slimiar to pseudocode.
Comments can be done just like in C:
// Example /* Hello! * Hello! */
Or in pseudocode:
Comentariu Example Bloc de text Hello! Hello!
Commands
| !Romanian | Meaning |
|---|---|
| Program [nume], [ieșire/intare], [ieșire/intare] | Declares the start of the program, and input/output. Just like in Pascal. Can be omitted. |
| Repetă | Do |
| Până când [expresie] | While the condition is false |
| Cât timp [expresie] | While the condition is true |
| Cât timp [expresie] execută | While loop |
| Dacă [expresie] atunci | If block |
| Altfel dacă [expresie] atunci | Else if block |
| Altfel | Else block |
| Citește [var] | Gives user input to a variable |
| Scrie [var/expresie] | Prints text or a value to the screen |
| [var] = [valoare] | Sets the variable to a value |
| Pentru [var] <- [start],[sfârșit],[pas] | For loop block |
| Început | Begins the program. Can be omitted. |
| Sfârșit | Ends the program. Can be omitted. |
| Întreg/Zecimal/Caracter/Șir/Zecimal-64/Listă/Vector | Declares the variables for later use. Equivalent to int, float, char, string, float64, list, array. |
Examples
Hello, world!
Program hello, ieșire
Început
Scrie "Hello, world!"
Sfârșit
Or, if you want in Romanian:
Program bună, ieșire
Început
Scrie "Bună, lume!"
Sfârșit
Cat
Program cat, intare, ieșire
Început
Citește cat
Scrie cat
Sfârșit
Truth Machine
Program truth, intare, ieșire
Început
Citește truth
Dacă truth = 0 atunci
Scrie 0
Cât timp truth = 1 execută
Scrie 1
Sfârșit