![]() |
|
Navigation |
Synopsis Wrong number of subscripts is used.
Description Subscription is available for values of various types including:
Rascal:String, Rascal:Values/Node,
Rascal:List/Subscription, Rascal:Map/Subscription, Rascal:Tuple/Subscription and Rascal:Relation/Subscription.
This error is generated when subscription is applied to a value that does support subscription but not the number
of indices that are used.
Remedies: correct the number of indices used in the subscription.
Examples
rascal>[1,2,3][2,1]; |stdin:///|(10,1,<1,10>,<1,11>): Unsupported subscript arity of 2 on type list[int] rascal>("a":1, "b":2, "c":3)["c", "d"]; |stdin:///|(27,3,<1,27>,<1,30>): Unsupported subscript arity of 2 on type map[str, int] rascal><1, 2, 3>[5,6]; |stdin:///|(12,1,<1,12>,<1,13>): Unsupported subscript arity of 2 on type tuple[int,int,int] ![]() |