31 lines
711 B
Text
31 lines
711 B
Text
$ include "seed7_05.s7i";
|
|
|
|
const func boolean: a (in boolean: aBool) is func
|
|
result
|
|
var boolean: result is FALSE;
|
|
begin
|
|
writeln("a");
|
|
result := aBool;
|
|
end func;
|
|
|
|
const func boolean: b (in boolean: aBool) is func
|
|
result
|
|
var boolean: result is FALSE;
|
|
begin
|
|
writeln("b");
|
|
result := aBool;
|
|
end func;
|
|
|
|
const proc: test (in boolean: param1, in boolean: param2) is func
|
|
begin
|
|
writeln(param1 <& " and " <& param2 <& " = " <& a(param1) and b(param2));
|
|
writeln(param1 <& " or " <& param2 <& " = " <& a(param1) or b(param2));
|
|
end func;
|
|
|
|
const proc: main is func
|
|
begin
|
|
test(FALSE, FALSE);
|
|
test(FALSE, TRUE);
|
|
test(TRUE, FALSE);
|
|
test(TRUE, TRUE);
|
|
end func;
|