aqua/aqua-src/ret.aqua
2021-08-11 10:55:25 +03:00

21 lines
556 B
Plaintext

service GetStr("multiret-test"):
retStr: string -> string
service GetNum("multiret-num"):
retNum: -> u8
const someNum = 5
const someStr = "some-str"
func tupleFunc() -> string, u8:
str <- GetStr.retStr(someStr)
n <- GetNum.retNum()
<- str, n
func multiReturnFunc(somethingToReturn: []u8, smthOption: ?string) -> []string, u8, string, []u8, ?string, u8:
res: *string
res <- GetStr.retStr(someStr)
res <- GetStr.retStr("random-str")
res, tNum <- tupleFunc()
<- res, 5, someStr, somethingToReturn, smthOption, tNum