Error Messages/46661

< Error Messages
Revision as of 14:36, 18 August 2025 by Lchrisman (talk | contribs) (Created page with "== Error Message == :The value passed to the repeated parameter forwarding operator while splatting into a list has 2 dimensions, so it is ambiguous which dimension is being f...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Error Message

The value passed to the repeated parameter forwarding operator while splatting into a list has 2 dimensions, so it is ambiguous which dimension is being forwarded.

Cause

This happens when you have an expression such as:

['a', ...x]

where x has multiple dimensions, i.e., more than 1 dimension. In this case, it is ambiguous as to which dimension of x is being forwarded (aka splatted).

To specify which dimension you intend to insert, you can declare it using a local as follows (in the example, we intend to splat along J):

Local x2[ J ] := x;
['a', ...x2]

The result will have the remaining indexes of x2 (excluding J).

Comments


You are not allowed to post comments.