ARX Language Reference
Here we have a basic view of all functionality in code examples
Types
bool is_arx = true
int number = 8
float ratio = 3.14
string message = 'Artemis'
list:int integer_list = [1, 2, 3]
Functions
int sum(int x, int y) {
return x + y
}
Entry of main executable
using io // input output C library import
int _exec() { // Called _exec and yes, this is a comment
io.print('HELLO WORLD!\n')
return 0
}
Classes
class Counter {
int value = 0
void _init(int start) {
this.value = start
}
void increment() {
this.value++
}
}
Can increase with number++
or decrease number--
Loops
using io
int _exec() {
list:string x = ['A', 'B', 'C']
for (string i in x) {
io.print(i)
io.print('\n')
}
return 0
}
using io
int _exec() {
int i = 0
while (i < 10) {
i++
io.print(i)
io.print('\n')
}
return 0
}