|
Severe errors - return code 3
|
|
|
0
|
"The following statements are not inside
|
|
any loop:"
|
|
|
|
Indicates that a break or next statement has
|
|
appeared outside of a loop.
|
|
|
1
|
"The following statements are not inside
|
|
any procedure:"
|
|
|
|
Indicates that an error or return statement has
|
|
appeared outside of a procedure.
|
|
|
2
|
"These names were declared more than
|
|
once as a local variable:"
|
|
|
|
Indicates that the same local variable has been
|
|
declared more than once in a procedure's local
|
|
statement.
|
|
|
3
|
"These names appeared more than once in
|
|
the parameter list:"
|
|
|
|
Indicates that the same parameter has been
|
|
declared more than once in a procedure's parameter
|
|
list.
|
|
|
4
|
"These names were declared as both a
|
|
local variable and a parameter:"
|
|
|
|
Indicates that a procedure has a parameter and
|
|
local variable with the same name.
|
|
|
5
|
"Invalid left hand side of assignment:"
|
|
|
|
Indicates that an invalid expression (e.g. a set,
|
|
a sum, etc.) appears on the left hand side of an
|
|
assignment.
|
|
|
|
Serious errors - return code 2
|
|
|
6
|
"These names were used as the same loop
|
|
variable for nested loops:"
|
|
|
|
Indicates that an inner loop uses the same loop
|
|
control variable as an outer loop.
|
|
|
7
|
"There is unreachable code that will
|
|
never be executed:"
|
|
|
|
Indicates that a statement occurs immediately
|
|
after a break, next, return, or error statement.
|
|
Such a statement can never be reached during the
|
|
course of execution.
|
|
|
8
|
"These names were used as iteration
|
|
control variables for both a $, sum, or
|
|
product construct and a loop:"
|
|
|
|
Indicates that a construct such as seq, add, or $
|
|
uses the same control variable as an enclosing
|
|
loop.
|
|
|
9
|
"These names were used as global names
|
|
but were not declared:"
|
|
|
|
Indicates that a procedure makes use of some
|
|
global names, but has not declared them as such.
|
|
|
10
|
"Underscore names are reserved for use
|
|
in the library. These global names start
|
|
with _:"
|
|
|
|
Indicates use of a global name beginning with the
|
|
underscore ("_") character. Such names are
|
|
reserved for use by Maple's supplied library.
|
|
|
11
|
"These local variables were never used:"
|
|
|
|
Indicates that the local variables were declared,
|
|
but never used within the procedure. Removing the
|
|
declarations can marginally improve performance
|
|
and reduce memory usage.
|
|
|
12
|
"These exported variables were never used:"
|
|
|
|
Indicates that the module exports were declared,
|
|
but never used within the module. Removing the
|
|
declarations can marginally improve performance
|
|
and reduce memory usage.
|
|
|
13
|
"These local variables were used but
|
|
never assigned a value:"
|
|
|
|
Indicates that a local variable's value was used,
|
|
but that no value was ever assigned to it,
|
|
suggesting a coding error.
|
|
Note that if a variable is intended to be used only
|
|
as a symbol in a procedure, and is not to be assigned,
|
|
declaring it as type nothing will avoid this error.
|
|
|
14
|
"These local variables were assigned a
|
|
value but otherwise not used:"
|
|
|
|
Indicates that a value was assigned to a local
|
|
variable, but that this variable was then never
|
|
used, suggesting a coding error.
|
|
|
15
|
"These parameters were never used:"
|
|
|
|
Indicates that the specified parameters of a
|
|
procedure were never actually referred to by name
|
|
within the procedure.
|
|
|
16
|
"These names defined in a macro or alias
|
|
statement were assigned a value:
|
|
|
|
Indicates that a value that has a macro expansion
|
|
appears on the right hand side of an assignment,
|
|
meaning that the object being assigned to is not
|
|
what it appears to be.
|
|
|
17
|
"These parameters were also used as
|
|
macro or alias names:"
|
|
|
|
Indicates that a procedure parameter name
|
|
conflicts with a macro or alias name.
|
|
|
18
|
"These local variables were also used as
|
|
macro or alias names:"
|
|
|
|
Indicates that a procedure's local variable name
|
|
conflicts with a macro or alias name.
|
|
|
19
|
"These macro or alias names were
|
|
expanded to a non-name where a name was
|
|
needed:"
|
|
|
|
Indicates that a macro or alias that expands to
|
|
something other than a name has appeared in a
|
|
context where a name is required.
|
|
|
20
|
"Possible implied multiplication:"
|
|
|
|
Indicates that an expression such as 2(x+1) has
|
|
been encountered. In Maple, this means "apply the
|
|
constant function 2 to the argument x+1", not
|
|
"multiply 2 by x+1".
|
|
|
21
|
"Quotes are not needed around these
|
|
names:"
|
|
|
|
Indicates that a name was written with backquotes
|
|
(``) when such quotes were redundant.
|
|
|
22
|
"These local variables were not declared
|
|
explicitly:"
|
|
|
|
Indicates local variables that were implicitly
|
|
declared (Maple declares as local any variables
|
|
that are undeclared, and appear on the left hand
|
|
side of an assignment or as the control variable
|
|
of a loop).
|
|
|
|
Warnings - return code 1
|
|
|
23
|
"The following function calls disagree
|
|
with number of parameters in the
|
|
function definition:"
|
|
|
|
Indicates that a function was called with the
|
|
wrong number of arguments based on the information
|
|
given in a library database.
|
|
|
24
|
"These library names were assigned a
|
|
value:"
|
|
|
|
Indicates that a name appearing in a library
|
|
database was assigned to.
|
|
|
25
|
"These system defined names were
|
|
assigned a value:"
|
|
|
26
|
"These system defined names were
|
|
redefined in a macro or alias
|
|
statement:"
|
|
|
|
Indicates that a system-defined name (e.g. Pi) was
|
|
assigned to.
|
|
|
27
|
"These catenated names were used:"
|
|
|
|
Indicates that the concatenation operator (||) was
|
|
used to create a name.
|
|
|
28
|
"These parameters or local variables are
|
|
also system defined names:"
|
|
|
|
Indicates that a parameter or local variable hides
|
|
a system defined name from use inside a procedure.
|
|
|
29
|
"These names defined in a macro or alias
|
|
statement were redefined:"
|
|
|
|
Indicates that a pre-defined macro or alias has
|
|
been redefined.
|
|
|
30
|
"Control variable of seq, add, or mul
|
|
not referenced in body:"
|
|
|
|
Indicates that the body expression of a seq, add,
|
|
or mul call is not a function of the control
|
|
variable.
|
|
|
31
|
"Equations were used as statements on
|
|
the following lines:"
|
|
|
|
Indicates that an equation (e.g. a=b) occurs by
|
|
itself as a statement, suggesting that an
|
|
assignment (a:=b) might have been intended
|
|
instead.
|
|
|
32
|
"These parameters were never used
|
|
explicitly:"
|
|
|
|
Indicates that a named formal parameter of a
|
|
procedure is never actually used within the body
|
|
of the procedure.
|
33
|
"These global variables were declared,
|
|
but never used:"
|
|
|
|
Indicates that the global variables were declared,
|
|
but never used within the procedure.
|
34
|
"These local variables were used before
|
|
they were assigned a value:"
|
|
|
|
Indicates that the local variables may have
|
|
been used in an expression before they were
|
|
initialized.
|
35
|
"Ineffectual call to with() inside a proc"
|
|
|
|
Indicates that the with command was used inside
|
|
a procedure. The with() command binds names within
|
|
a package so the package prefix can be omitted.
|
|
When called inside a procedure, the bindings don't take
|
|
effect until the procedure is finished, so the short
|
|
names cannot be used within the procedure itself.
|
|
Consider the uses statement instead.
|