Download Maple Introductory Programming Guide

Transcript
1.5 Troubleshooting •
19
Error, missing operator or ‘;‘
You can avoid this error by using * to indicate multiplication.
> 2*a + b;
2a + b
Invalid, Wrong Number or Type of Arguments
An error is returned if the argument(s) to a Maple library command are
incorrect or missing.
> evalf();
Error, invalid input: evalf expects 1 or 2 arguments,
but received 0
> solve(y=3*x+4, 5);
Error, (in solve) invalid arguments
> cos(x, y);
Error, (in cos) expecting 1 argument, got 2
If such an error occurs, check the appropriate online help page for the
correct syntax. Enter ?topic_name at the Maple prompt.
Unbalanced Parentheses
In complicated expressions or nested commands, it is easy to omit a closing parenthesis.
> [(1,0), (0,1];
Error, ‘]‘ unexpected
In a valid statement, each (, {, and [ requires a matching ), }, and
], respectively.
> [(1,0), (0,1)];
[1, 0, 0, 1]