I'm sorry for my silly question. One way around that problem is to use
errcatch function, so the following is work satisfactory
(C1) display2d:false;
(D1) FALSE
(C2) bothcases:false;
(D2) FALSE
(C3) TESTTERM(X):=BLOCK(FOR i:1 UNLESS ERRCATCH(PART(X,i))=[] DO
(TEMP[i]:PART(X,i),j:i),makelist(temp[i],i,1,j))$
(C4) expr:X*Y*Z;
(D4) X*Y*Z
(C5) testterm(expr);
PART fell off end.
(D5) [X,Y,Z]
best regards to all
Valerij
On Tuesday 17 December 2002 18:59, Valerij Pipin wrote:
> Hello,
> when I give a wrong number of the expression level the function part return
> an error instead something like false or nil
> (C1) expr:X*Y*Z;
> (D1) X Y Z
> (C2) part(expr,3);
> (D2) Z
> (C3) part(expr,4);
> PART fell off end.
> -- an error. Quitting. To debug this try DEBUGMODE(TRUE);)
> (C4)
> what could be a way aroud this?
>
> Thanks in advance
>
> Valerij
> _______________________________________________
> Maxima mailing list
> Maxima@www.math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima