Function::slotp
Details
-
- This message is generated when the argument in a SlotSequence expression in Function is not a positive integer.
- The notation ##n is equivalent to SlotSequence[n] if n is a positive integer.
- If SlotSequence is used in a position where it is not evaluated, such as in Function, arguments that might evaluate to integers will not be evaluated unless Evaluate or some other construction is used to cause the evaluation.
- Off[message] switches off the message; On[message] switches it on. For example: Off[Function::slotp].
Examples
Basic Examples (3)
An error occurs because the argument in SlotSequence is not an integer:

The error will be generated unless the argument in SlotSequence is a non-negative integer or evaluates to give a non-negative integer:


These examples show valid uses of SlotSequence in a Function expression: