How to print the values of a recursive function



Dear all,

I would like to print a value of a recursive function. For example,
Character(1, 2, 1, 1). But the following codes doesn't work. I don't know
where is the problem. Thank you very much.

Best wishes,
Jianrong.



   for k:0 thru 20 step 1 do
         for n:0 thru 20 step 1 do
              for l:0 thru 20 step 1 do
                        Character[m*21*21*21+k*21*21+n*21+l]:0;

Character(m, k, n, l):= block([],
if (Character[m*21*21*21+k*21*21+n*21+l] > 0 ) then
(Character[n*21*21*21+k*21*21+m*21+l]:Character[m*21*21*21+k*21*21+n*21+l],
Character[m*21*21*21+l*21*21+n*21+k]:Character[m*21*21*21+k*21*21+n*21+l],
Character[n*21*21*21+l*21*21+m*21+k]:Character[m*21*21*21+k*21*21+n*21+l],
return Character[m*21*21*21+k*21*21+n*21+l] )
else if (m=0 and k=0 and n=0 and l=0) then return 1
else if ((m=1 and k=0 and n=0 and l=0) or ((m=0 and k=0 and n=1 and l=0)) )
then return Fundamental1
else if ((m=0 and k=1 and n=0 and l=0) or ((m=0 and k=0 and n=0 and l=1)) )
then return Fundamental2
else if (m>0 and k>0 and n>0 and l>0) then return (Character(m-1, k, n,
l)*Character(m, k, n, l-1)-Character(0, 2*m-1, floor(k/2),
0)*Character(floor(k/2), 2*n, 0, 0))/(Character(m-1, k, n, l-1))
else if (m>0 and k>0 and n>0 and l=0) then return (Character(m-1, k, n,
0)*Character(m, k, n-1, 0)-Character(0, 2*m-1, floor(k/2),
0)*Character(floor(k/2), 2*n-1, 0, 0))/(Character(m-1, k, n-1, 0))
else if (m>0 and k>0 and n=0 and l=0) then return (Character(m-1, k, 0,
0)*Character(m, k-1, 0, 0)-Character(floor(k/2), 2*m-1, 0,
0)*Character(floor((k-1)/2), 0, 0, 0))/(Character(m-1, k-1, 0, 0))
else if (m>0 and k=0 and n=0 and l=0) then return (Character(m-1, 0, 0,
0)*Character(m-1, 0, 0, 0)-Character(0, 2*(m-1), 0, 0))/(Character(m-2, 0,
0, 0))
else if (m=0 and k>0 and n=0 and l=0) then return (Character(0, k-1, 0,
0)*Character(0, k-1, 0, 0)-Character(floor((k-1)/2), 0, 0,
0)*Character(floor(k/2), 0, 0, 0))/(Character(0, k-2, 0, 0))
);