optional variable deffinition added, annotations removed

This commit is contained in:
ProgramSnail 2023-06-08 19:22:56 +03:00
parent 7ce8513ad0
commit de7c1e062f
20 changed files with 178 additions and 57 deletions

View file

@ -278,6 +278,9 @@ def scan-three = & \io..scan: & \io..scan: & \io..scan:
exec main {
var n = scan-anything:[int]
var x = (for _ in 0--n do scan-int:) // $array[int] & 0
var k? = if n < 2 then n in print-anything:[string] "n < 2"
; print-anything:[int] n
var & a & b & c = scan-three-t:

View file

@ -6,6 +6,8 @@ def test-variables : a = {
var z = 543.32 in {
for x in 1--10 do print: 111
if scan:[int] < 11 then do-something-another: z "ccc"
if scan:[int] < 11 then do-something-another: z "aaa"
}
var (& t? & _ & t3)? = maybe-something: in do-something-func: t1 t3
}