Skip to content
Brian edited this page Nov 1, 2024 · 2 revisions

Here you can learn the language's syntax

Example:

class Base
    vars id
    
    method showid()
    vars x
    begin
        self.id = 10
        x = self.id
        io.print(x)
        x = 0
        return x
    end-method
end-class

class Person
    vars num
 
    method calc(x)
    vars y, z
    begin
        z = self.num
        y = x + z
        io.print(y)
        y = new Base
        return y
    end-method
end-class

main()
vars p, b, x
begin
    b = new Base
    p = new Person
    p._prototype = b
    b.id = 111
    p.num = 123
    p.id = 321
    x = 1024
    p.showid()
    p.calc(x)
end

Clone this wiki locally