Question: Recursive zero finder

Hey I have a list of matrices and I want to define a proc that will search through the first matrices entries looking for zeroes, and if it finds one to move on to the next matrix in the list and look for zeroes and so on. if for some reason all matrices in the list have zeroes i would like the proc to answer with 0. otherwise I would like it to answer with the ndex of the first matrix wth all non-zero entries. I've played with things and occasionally made things work. But in general I do not have a solution. This is what I'e tried:

Things like this:

recu:=proc(y,n,q)
options trace;
local f,j,t,k;
t[y]:=y:
k:=y:
for f from 1 to n while y<=q do;
for j from 1 to n do;
if evalb(C[k](f,j)=0) then;
t[y+1]:=t[y]+1;
recu(t[y+1],n,q);
else next;
end if;
end do;
end do;
end proc;

like this:

recu:=proc(y,n,q)
local f,j,t,k;
global S;
options trace;
S:=0;
if y=q then return "no";
end if;
for f from 1 to n do;
for j from 1 to n do;
if evalb(C[y](f,j)=0) then;
recu(y+1,n,q);
S:=S+1;
end if;
end do;
end do;
end proc;

And I think I understand well why these are not workinging however I wondered what I can do that will be syntactically (sp?) correct.

Thanks

Please Wait...