On Thursday 24 October 2002 17:57, jblazi wrote:
> I should like to port this code line from Maple to Maxima:
>
> for i from j to n do if M[i][j] <> 0 then break; end if; end do;
>
> How can I do this?
> TIA,
I see I have to use return for this.
I should like to ask a few additional questions:
(1)
I have a block and a do within the block. How can I quit the block from within
the do (and return a seinsible value)? Do I have to do something like
return(do ... return(x)$)?
(2)
How can I program this in Maxima:
for i from j to n do if M[i][j] <> 0 then break; end if; end do;
if i=n+1 then return 0; end if;
Do I have to do something lile i:for ... return(i)?
TIA,
--
Janos Blazi
--
Janos Blazi