Skip to content
This repository has been archived by the owner on Aug 9, 2024. It is now read-only.

Latest commit

 

History

History
96 lines (79 loc) · 1016 Bytes

SYNTAX.md

File metadata and controls

96 lines (79 loc) · 1016 Bytes

Structure

Porject must start with a func main() statement, defining the to run program.

Variables

var name = variable;

String

var foo = "//string"

Conditions

Operators have natural language and symbolic options.

==    !=        and     or
is    is not    and     or

Function definition

func funcName(params)
{

}

Collection

var list = []
list[index]

Comments

// This is a comment;

Control Flow Statements

Conditions

Using an operator from: ==, !=, <, <=, >, >=. Double statements using and and or

variable == true
variabel == false

If Statements

if condition
{
    //then body;
}
elif condition
{
    //then body;
}
else
{
    //then body;
}

For Loop

for var name = int to int
{
    //then body;
}
foreach(var item in list)
{
    //then body;
}

While Loop

while condition
{
    //then body;
}