aqua-playground/aqua/examples/constants.aqua
2021-09-01 15:01:01 +03:00

18 lines
440 B
Plaintext

import "@fluencelabs/aqua-lib/builtin.aqua"
service Getter("test"):
createStr: u32 -> string
service OpO("op"):
identity: string -> string
-- a question mark means that this constant could be rewritten before this definition
const ANOTHER_CONST ?= "default-str"
const UNIQUE_CONST ?= 5
func callConstant() -> []string:
res: *string
res <- Getter.createStr(UNIQUE_CONST)
res <- OpO.identity(ANOTHER_CONST)
<- res