invalid product or quotient - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


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

Error, invalid product/quotient

 

Description

Examples

Description

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.

Examples

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

b

Error, invalid product/quotient

Solution:

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

bb

b2

(2.1)

 

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

Solution:

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.

;5

Error, invalid product/quotient

Solution:

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

a5

5a

(2.2)

See Also

arithop

* type arithmetic expressions

Executable and Nonexecutable Math