Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Core Language > Package Development > Messages > MessageName (::) >
Mathematica > Core Language > Tuning & Debugging > Messages > MessageName (::) >

MessageName


is a name for a message.
  • You can specify messages by defining values for .
  • is converted to MessageName. tag can contain any characters that can appear in symbol names. symbol::"tag" can also be used.
  • Assignments for are stored in the Messages value of the symbol s.
  • The f::usage message is typically defined for functions intended for general use, giving a description of how to use the function.
  • ?f prints out the message f::usage.
  • When ?form finds more than one function, only the names of the functions are printed.
  • You can switch on and off messages using On and Off.
  • MessageName or represents a message in a particular language.
Define a usage message for a function:
Show the usage message:
Process messages generated during an evaluation:
Define a usage message for a function:
In[1]:=
Click for copyable input
Show the usage message:
 
Process messages generated during an evaluation:
In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=
Define a function that will test another function and give the argx message if needed:
Define g to use the test and return unevaluated when it fails:
New in 1 | Last modified in 4
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF