|
![](/i/fill.gif) |
> #declare Factorial =
> function(A) { select(A, 1, 1, A*Factorial(A-1)) };
>
> #declare Value = Factorial(8);
> #debug concat("Factorial of 8 is ", str(Value, 0, 0), "n")
Hi Warp,
I tried your piece of code and it works but I need to use recursion with
element of an array...so I've modified your code in this way:
#declare w= array [10];
....[assigning integer value to w elements]
#declare Factorial =
function(A) { select(A, 1, 1, w[A]*Factorial(A-1)) };
compiling, I've obtained this error (related on w[A]):
Parse Error: Expected 'numeric expression', undeclared identified 'A' found
instead ...
But why??? A is sure not initialited (but it's a parameter...) but why
undeclared?!?!
Leo
Post a reply to this message
|
![](/i/fill.gif) |