Package: iconc (testing)
Version: 9.4.2-2.2

When I invoke iconc to compile a program, I get this:

iconc fact.icn
Translating to C:
fact.icn:
No errors; no warnings
Compiling and linking C code:
fact.c: In function 'P001_main':
fact.c:81: error: incompatible type for argument 1 of 'O114_subsc'
*** C compile and link failed ***

I use gcc version 4.0.2-2.

####################################################################
fact.icn:

procedure fac (n, acc)
if n < 1 then stop (n, " is not a positive integer.")
else if n = 1 then return acc
else return fac (n-1, n*acc)
end

procedure main (args)
write(fac (args[1], 1))
end



Reply via email to