semicolon unexpected - 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 : semicolon unexpected

Error, `;` unexpected

 

Description

Examples

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;

Error, `;` unexpected

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);

fx5+1x4x2

(2.1)

Example 2: For users of Maple 2023 and earlier versions

In earlier versions of Maple, this error could occur when you press Enter prematurely, even if your input didn't explicitly end with a semicolon.  (This was confusing, and now users get message that better fits the situation.)

sin(Pi

Error, `;` unexpected

Solution

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

sin(Pi)

0

(2.2)

See Also

LinearAlgebra/General/MVshortcut

Statement Separators

set

syntax