|
Calling Sequence
|
|
FormatMessage( msgString, msgArg1, msgArg2, ... )
|
|
Parameters
|
|
msgString
|
-
|
string
|
msgArg1, msgArg2, ...
|
-
|
arguments to substitute into msgString
|
|
|
|
|
Description
|
|
•
|
The FormatMessage function accepts the same formatting arguments as an invocation of the error command or a call to the WARNING function.
|
|
Unlike raising an exception or displaying a warning, a call to FormatMessage returns a string containing the message. That string will contain the same text as an error or warning, but with no "Error," or "Warning," prefix.
|
•
|
This function is part of the StringTools package, and so it can be used in the form FormatMessage(..) only after executing the command with(StringTools). However, it can always be accessed through the long form of the command by using the form StringTools:-FormatMessage(..).
|
|
Note: The %n input of FormatMessage should be used for showing a message to a human, not for formatting Maple objects for parsing by Maple or other programs. For more sophisticated formatting capabilities, see sprintf.
|
|
|
Examples
|
|
>
|
|
>
|
|
>
|
|
>
|
|
>
|
|
>
|
|
>
|
|
>
|
|
>
|
|
>
|
|
| (10) |
>
|
|
>
|
|
| (12) |
>
|
|
| (14) |
>
|
|
| (15) |
|
|
Compatibility
|
|
•
|
The StringTools[FormatMessage] command was updated in Maple 15.
|
|
|
|