This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
 Documentation / Mathematica / Built-in Functions / Input and Output / Messages  /

  • symbol :: tag is a name for a message.
  • You can specify messages by defining values for symbol :: tag.
  • symbol :: tag is converted to MessageName[ symbol , " tag "]. tag can contain any characters that can appear in symbol names. symbol ::" tag " can also be used.
  • Assignments for s :: tag are stored in the Messages value of the symbol s.
  • The following messages for functions are often defined:
  • ? f prints out the message f ::usage.
  • When ? form finds more than one function, only the names of each function are printed.
  • You can switch on and off messages using On[ s :: tag ] and Off[ s :: tag ].
  • MessageName[ symbol , " tag ", " lang "] or symbol :: tag :: lang represents a message in a particular language.
  • See the Mathematica book: Section 2.8.21.
  • See also: Message, MessageList, $MessageList.

    Further Examples

    You can define various tags for functions that you wish to document in some way. Here is a note assigned to the function average.



    Here is the function definition.


    You can information about the function average in a variety of ways.



    average[list_] := Plus @@ list/Length[list]