Section Header
- name := HELLO_WORLD;
Section Public
- main <-
(
"Hello world\n".print;
);
Section Header
- name := FACTORIAL;
Section Private
- factorial x:INTEGER :INTEGER <-
( + result:INTEGER;
(x <= 1).if {
result := 1;
} else {
result := x * factorial (x - 1);
};
result
);
Section Public
- main <-
(
"5! = ".print;
factorial 5 .print;
);