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  /
Off

  • Off[ symbol :: tag ] switches off a message, so that it is no longer printed.
  • Off[ s ] switches off tracing messages associated with the symbol s.
  • Off[ , , ... ] switches off several messages.
  • Off[ ] switches off all tracing messages.
  • The value of symbol :: tag is not affected by Off.
  • Off[ s ] is equivalent to Off[ s ::trace].
  • Off[ ] is equivalent to Off[ s ::trace] for all symbols.
  • See the Mathematica book: Section 1.3.11Section 2.8.21.
  • See also: On, Message, Check.

    Further Examples

    This prints a warning message.

    In[1]:=

    Log::argt: Log called with 3 arguments; 1 or 2 arguments are expected.

    Out[1]=

    You can switch off the warning message with Off.

    In[2]:=

    In[3]:=

    Out[3]=

    This switches on tracing of all symbols.

    In[4]:=

    On::trace: On[] --> Null.

    In[5]:=

    Set::trace: a = 5 --> 5.

    Out[5]=

    In[6]:=

    a::trace: a --> 5.

    2 2
    Power::trace: a --> 5 .

    2
    Power::trace: 5 --> 25.

    2
    Plus::trace: a - c --> 25 - c.

    2
    b::trace: b[a - c] --> b[25 - c].

    Out[6]=

    This switches tracing off.

    In[7]:=