first usable version
This commit is contained in:
64
IBAF-Tests/IBAF-1/test.fct
Normal file
64
IBAF-Tests/IBAF-1/test.fct
Normal file
@@ -0,0 +1,64 @@
|
||||
initialise-binding finalise-failing scope
|
||||
(collateral
|
||||
(bind
|
||||
("x",
|
||||
allocate-initialised-variable
|
||||
(integers,
|
||||
0)),
|
||||
bind
|
||||
("y",
|
||||
allocate-initialised-variable
|
||||
(integers,
|
||||
0))),
|
||||
sequential
|
||||
(assign
|
||||
(bound
|
||||
("x"),
|
||||
decimal-natural
|
||||
("10")),
|
||||
assign
|
||||
(bound
|
||||
("y"),
|
||||
checked int-mod
|
||||
(assigned
|
||||
(bound
|
||||
("x")),
|
||||
int-val [: 0 :])),
|
||||
print
|
||||
(assigned
|
||||
(bound
|
||||
("x"))),
|
||||
print
|
||||
(assigned
|
||||
(bound
|
||||
("y"))),
|
||||
print
|
||||
(is-equal
|
||||
(assigned
|
||||
(bound
|
||||
("x")),
|
||||
decimal-natural
|
||||
("1"))),
|
||||
print
|
||||
(is-equal
|
||||
(assigned
|
||||
(bound
|
||||
("x")),
|
||||
assigned
|
||||
(bound
|
||||
("y")))),
|
||||
print
|
||||
(is-less
|
||||
(assigned
|
||||
(bound
|
||||
("x")),
|
||||
assigned
|
||||
(bound
|
||||
("y")))),
|
||||
print
|
||||
(int-add
|
||||
(assigned
|
||||
(bound
|
||||
("x")),
|
||||
decimal-natural
|
||||
("2")))))
|
||||
Reference in New Issue
Block a user