Skip to content

Alok-Joshi/alox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Alox Programming Language

About

Alox is a statically typed, interpreted programming language that aims to balance simplicity and power. It was created with the following principles in mind:

Features

Tour of the Language

1. Variables

Variables are declared using the var keyword

var: String a = 2;

2. Data Types

Alox supports two datatypes: Number and String

var: String name = "John"
var: Number age = 30

3. Conditional Statements

You can use if, else if, and else for conditional branching.

if(condition){
 //do something
}
else{
//do something

}

4. Loops

Alox offers both for and while loops.

For Loop

for(var: Number i = 0; i<10; i = i +1 ){
      #code block
}

While Loop

while(1){
    print 1;
}
    # code block

5. Functions

Define functions using the func keyword. You can specify parameters and return types.

fun add(var: Number x, var: Number y){
    return x + y
}

6. Arrays and Lists

Create arrays and lists to store collections of data. Feature currently under development

7. Object-Oriented Programming

Feature currently under development

8. Exception Handling

Use try, catch, and throw for exception handling. Feature currently under development

10. Modules and Libraries

Import and use external modules and libraries to extend Alox's functionality. Feature currently under development

About

Compiler for the Alox Programming Language

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors