invalid product or quotient - Maple Help

Online Help

All Products    Maple    MapleSim

Home : Support : Online Help : System : Error Message Guide : invalid product or quotient

Error, invalid product/quotient





Arithmetic expressions are formed using arithmetic operators. The * and / type expressions are formed by using the * operator or the / operator with two operands, resulting in an arithmetic expression of the form operand * operand or operand/operand. This error message occurs when the * or /operator, in a leading position, receives fewer than the expected two operands.


Tip: If an expression is executed accidentally, it can lead to error messages (if it is not valid Maple syntax). If this happens, toggling the expression to nonexecutable math removes the error message and changes the math to nonexecutable. To change an expression to nonexecutable math use the shortcut key Shift + F5.  For more information, see Executable and Nonexecutable Math.


Example 1

All valid products and quotients require two operands. However, only one operand is given in the examples below. In the first example, no value divided by b is an invalid quotient; in the second example, no value times a is an invalid product.


/ b

Error, invalid product/quotient

* a

Error, invalid product/quotient


Error, invalid product/quotient


In the above examples, adding an operand before the operator corrects the error.





Example 2
In the next example, the text within the parentheses should be entered as a string. However, because this text is not enclosed in double quotes ("), Maple interprets the statement as a quotient and the error occurs.


readdata/My Documents/Book1.csv

Error, invalid product/quotient


Placing double quotes around the path and file name corrects the error.

readdata/My Documents/Book1.csv

Error, (in readline) file or directory does not exist


Example 3

In the next example, two operands appear to be on each side of the dot operator; however, the semicolon is not valid in the first spot. It is a statement terminator, so the text that follows the semicolon is considered to be part of a second statement. In this case, the second statement, *5, is an invalid product because an operand is missing before the operator. As a result, the error occurs.


Error, invalid product/quotient


Either replacing the semicolon with an operand or inserting an operand between the semicolon and the * operator will correct this error.




See Also


* type arithmetic expressions

Executable and Nonexecutable Math