The quit Statement and Function
Calling Sequence
Description
Examples
quit
done
stop
`quit`(expr)
`done`(expr)
`stop`(expr)
The quit statement (done and stop are synonyms) terminates the Command-line Maple session and returns the user to the shell from which Maple was started. In shells that can test or report the return status of an application (such as ERRORLEVEL in a Windows command-line shell and $? in a UNIX shell), Maple returns a status of 0.
The `quit` function (`done` and `stop` are synonyms) terminates the Command-line Maple session and returns the user to the shell from which Maple was started. The expr passed to `quit` must evaluate to an integer, and it is passed as a return status back to the shell. The range of valid return values is 0..255. Non-integer or out-of-range values raise an exception, and Maple will not terminate.
Return values 0 through 5 have predefined meanings as described in ?maple, although they can be used as arguments to `quit` if desired.
Note: quit, done, and stop are keywords in the Maple language, so they must be enclosed in left single quotes (`) when used in the function call form.
Note: In the Graphical User Interface version of Maple, entering quit, done, or stop at the Maple prompt does not terminate the Maple session. To terminate the Maple session, from the File menu, select Exit.
`quit`⁡12345
Error, argument to `quit` must be from 0 to 255
`quit`⁡12
bytes used=90888, alloc=131048, time=0.07
$ echo $?
12
Download Help Document