47 lines
817 B
Plaintext
47 lines
817 B
Plaintext
module: Main
|
|
import: os
|
|
function: main
|
|
params:
|
|
returns: int
|
|
body:
|
|
declare x: int = 0
|
|
|
|
x = inc(x, 1)
|
|
println(x)
|
|
|
|
x = inc(x, 7)
|
|
println(x)
|
|
|
|
return 0
|
|
end body
|
|
end function
|
|
|
|
function: inc
|
|
params:
|
|
declare num: int
|
|
returns: int
|
|
body:
|
|
return num + 1
|
|
end body
|
|
end function
|
|
|
|
function: inc
|
|
params:
|
|
declare num: int
|
|
declare v: int
|
|
returns: int
|
|
body:
|
|
return num + v
|
|
end body
|
|
end function
|
|
|
|
function: println
|
|
params:
|
|
declare i1: int
|
|
returns: void
|
|
body:
|
|
os.syscall("PRINTLN",i1)
|
|
end body
|
|
end function
|
|
end module
|