aqua-playground/aqua/constants.aqua
2021-04-28 03:26:26 +03:00

19 lines
342 B
Plaintext

import "println.aqua"
service Getter("test"):
getNum: -> u32
const c = "non-default string"
-- a question mark means that this constant could be rewritten before this definition
const c ?= "default string"
const a = 1
func callConstant(cb: string -> ()):
n <- Getter.getNum()
if n == a:
cb(c)
else:
cb(c)