From 7dfcc480ba1e19bd3232349fc733caef94034292 Mon Sep 17 00:00:00 2001 From: stainer_t Date: Mon, 8 Sep 2025 13:48:49 +0200 Subject: Initial commit from Polytechnique Montreal --- Ganlib/data/badluk_proc/xfact.c2m | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 Ganlib/data/badluk_proc/xfact.c2m (limited to 'Ganlib/data/badluk_proc/xfact.c2m') diff --git a/Ganlib/data/badluk_proc/xfact.c2m b/Ganlib/data/badluk_proc/xfact.c2m new file mode 100644 index 0000000..0b68171 --- /dev/null +++ b/Ganlib/data/badluk_proc/xfact.c2m @@ -0,0 +1,14 @@ +* +* Calling the recursive "fact" procedure: +* +* input to "fact": *n* +* output from "fact": *n_fact* +* +* use to compute n! +* + PROCEDURE fact ; + INTEGER n := 8 ; + INTEGER n_fact ; + fact :: <> >>n_fact<< ; + ECHO "FACTORIAL:" n $Bang_S "=" + n_fact ; + QUIT " Program *xfact* XREF " . -- cgit v1.2.3