Error Messages/40820

< Error Messages
Revision as of 18:33, 31 March 2010 by Lchrisman (talk | contribs) (Created page with '= Error Text = The third parameter to System Function Slice must be an integer or array of integers. = Cause = You have used one of these syntaxes: X[@I=n] Slice(X…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Error Text

The third parameter to System Function Slice must be an integer or array of integers.

Cause

You have used one of these syntaxes:

X[@I=n]
Slice(X,I,n)
Slice(I,n)

and «n» is non-numeric, or «n» is an array containing a non-numeric value.

This error seems to appear, but should not, when «n» is an array that containing a Null cell.

Remedy

Find the non-numeric entry, then figure out why it is non-numeric and fix that.

When «n» is an array, create another variable, temporarily, and define it as:

IsNumber(n)

replacing n with the «n» from your slice expression. Then view it to find where the value is non-numeric.


If you are having the Null problem, consider using this slice function:

Function Slice2(X:Array ; I : Index ; n : positive orNull)
Definition: If n=Null Then Null Else Slice(X,I,Max([n,1]))
Comments


You are not allowed to post comments.