25 lines
656 B
Plaintext
25 lines
656 B
Plaintext
|
# Arrays
|
||
|
|
||
|
define a1 as array of integer with value [1, 2, 3].
|
||
|
define a2 as array of boolean with value [true, false].
|
||
|
define a3 as array of float with size 64.
|
||
|
|
||
|
# Structs
|
||
|
define S1 as struct with body {
|
||
|
define a as integer.
|
||
|
define b as float.
|
||
|
|
||
|
define sum as function returning integer with body {
|
||
|
return sum of a from this and b from this.
|
||
|
}.
|
||
|
}.
|
||
|
|
||
|
# Interfaces
|
||
|
define Gettable as interface with body {
|
||
|
define get as function returning integer.
|
||
|
define getAll as function returning array of integer.
|
||
|
define getNone as function returning array of integer with body {
|
||
|
return array of integer with value [].
|
||
|
}.
|
||
|
}.
|