Note
This is a student project (EPITECH school). It is not intended to continue this project.
Important
StringView are not supported.
Important
There is no list/array in this language.
- Comentary
// This is a comment- Alias
alias A = Int;
- Variables Declaration
@Int a =1;
@StringView b ="hello";- Variables Assignment
a =1;
b ="hello";- Built-in Types
@Bool a =True;
@Bool b =False;
@Int c =1;
@Char e ='a';
@StringView f ="hello";There is a Void type that can be used to return nothing.
- Function Declaration
fnadd(a:Int,b:Int) -> Int{// the next line is the `return`
<- a + b;};
exportfnsub(a:Int,b:Int) -> Int{
<- a - b;};- Function Call
add(1,2);- Function Polymorphism
fnadd(a:Int,b:Int) -> Int{
<- a + b;};fnadd(a:Float,b:Float) -> Float{
<- a + b;};fnadd(a:Int,b:Int,c:Int) -> Int{
<- a + b + c;};- Conditions
if (a==1)
{
// do something
};
if (a==1)
{
// do something
}
else
{
// do something else
};- Loops
@Inti=0;
while (i<10)
{
// do somethingi=i+1;
};- Entrypoint
// If you don't have this function, the program will not be run
export fnstart() -> Int{
<- 0;};- Operators
a+ba-ba*ba/ba==ba!=ba<ba<=ba>ba>=b- Priority of Operators
// realy peticuliar buut we use { for ( and } for )
{a+B} *c