Files
IBAFLang/IBAF-Tests/IBAF-1/scopes.fct

59 lines
1.1 KiB
Plaintext

initialise-binding scope
(collateral
(bind
("x",
allocate-variable
(integers)),
bind
("y",
allocate-variable
(integers)),
map
( ),
map
( ),
bind
("y",
allocate-variable
(integers)),
map
( ),
map
( )),
sequential
(initialise-variable
(bound "x",
int-mul
(decimal-natural
("10"),
decimal-natural
("10"))),
sequential
(initialise-variable
(bound "y",
int-mul
(assigned bound
"x",
assigned bound
"x")),
print
(to-string assigned bound
"x",
"
"),
print
(to-string assigned bound
"y",
"
")),
if-else
(false,
initialise-variable
(bound "y",
0),
null),
print
(to-string assigned bound
"y",
"
")))