Error, ; unexpected - Maple Help

Home : Support : Online Help : Error, ; unexpected

Error, ; unexpected

 Description In 1-D math input, Maple displays this error message when your input is incomplete.  It could mean that you have mismatched or missing brackets or other delimiters.  For example, the bracket delimiters (, ), [, ], {, }, <, and > work in pairs, and an error occurs if a bracket is used and cannot be matched with its pair. Note: Sometimes this error occurs even when your input has no semicolon (;).  This may seem surprising.  In earlier version of Maple, all input expressions had to be terminated with a semicolon.  While that is no longer required, what happens is when you press Enter to execute the input, an implicit statement terminator is inserted.  Thus, the parser "sees" the incomplete expression and ending semicolon and issues the error.  For more information, see Statement Separators.

Examples

Example 1

This error can occur when you have a mismatched bracket or other delimiter.

 > f := (x^5+1)/(x^4-x^2;

Solution

Finish the input expression.  Look for mismatched brackets or other delimiters. In this case, add the closing bracket.

 > f := (x^5+1)/(x^4-x^2);
 ${f}{≔}\frac{{{x}}^{{5}}{+}{1}}{{{x}}^{{4}}{-}{{x}}^{{2}}}$ (2.1)

Example 2

This error occurs when you press Enter prematurely.

 > sin(Pi

Solution

Finish the input expression.  Look for mismatched brackets or other delimiters. In this case, add the closing bracket.

 > sin(Pi)
 ${0}$ (2.2)