32 lines
628 B
Plaintext
32 lines
628 B
Plaintext
(* TEST: [-asc -tc -cg -ir] *)
|
|
|
|
#include "std.alpha"
|
|
|
|
function entry : string2integer
|
|
function Fib : integer2integer
|
|
|
|
Fib(i) := {
|
|
[ Boolean: a ; Boolean: b ; Boolean: c]
|
|
if( i = 0 ) then {
|
|
return 7;
|
|
} else {
|
|
i := i;
|
|
}
|
|
(*b := b | (a & c);
|
|
b := 2 < 3;*)
|
|
if(i = 1) then {
|
|
i := printCharacter('a');
|
|
return 1;
|
|
} else {
|
|
return i + Fib(i - 1);
|
|
}
|
|
}
|
|
|
|
entry (arg) := {
|
|
[ integer: x; integer: y ]
|
|
x := 2;
|
|
x := Fib(2);
|
|
y := printInteger(Fib(2));
|
|
return 1;
|
|
}
|