Skip to content
This repository was archived by the owner on May 21, 2024. It is now read-only.
Nomi edited this page Jun 7, 2020 · 4 revisions

Welcome to the aup wiki!

TODO

Comments

; Original comment style
// Single-line comments - C style
/*
   Multi-line
   comments
*/

Variables

var a = 10
var b = 20
c = "Hello"

Functions

func add(a, b) {
    return a + b
}

func add2(a, b, &r) {
    r = a + b
}

func add3(a, b) = a + b

var add4 = (a, b) => a + b

Branches

if true then doSomething()

if false {
   doTask1()
   doTask2()
} else {
   doTask3()
}
switch (x)
|  y -> print(4)
|  z -> print(5)

Classes

class Dog(name) {
    :m_name = name
    :say() => print('woof..' + :m_name)
}

class LoudDog(name) : Dog {
    ::(name)
    :say() => print('I\'m ' + :m_name + ', a loud dog')
}

Clone this wiki locally