cannot split rhs for multiple assignment - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : System : Error Message Guide : cannot split rhs for multiple assignment

Error, cannot split rhs for multiple assignment

 

Description

Examples

Description

For users of Maple 2018 and earlier versions: This error message is displayed when the assignment cannot be made because the number of elements on both sides are not the same.

The assignment operator (:=) assigns the value of the right-hand side to the left-hand side, where the left-hand side must be a name, indexed name, function call, or sequence of these, and the right-hand side is an expression or sequence of expressions. Assigning a sequence of names on the left-hand side of the assignment operator to a sequence of values on the right-hand side is known as multiple assignment. If the left-hand side is a sequence of names, the right-hand side must evaluate to a sequence of expressions with the same number of members as the left-hand side.

 

The cannot split rhs for multiple assignment error occurs when the number of members in the expression sequence on the right-hand side (rhs) is less than the number of members in the sequence of names on the left-hand side.

Examples

Trying to assign the value 5 to x and y

x,y5

Error, cannot split rhs for multiple assignment

Solution:

In any multiple assignment, the number of elements on the left-hand side must equal the number of elements on the right-hand side or else Maple will not know how to proceed with the assignment.

x,y5,5

x,y5,5

(2.1)

See Also

assignment