problem with part(expr,i)



|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

"partswitch" can be set to TRUE to give "END" instead
of an error message.

(C1) expr:X*Y*Z;

(D1)                                 X Y Z
(C2) part(expr,3);

(D2)                                   Z
(C3) partswitch:TRUE;

(D3)                                 TRUE
(C4) part(expr,4);

(D4)                                  END

  
HTH,

lp