WOLFRAM

Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how
Wolfram Language & System Documentation Center

On [symbol::tag]

switches on a message, so that it can be printed.

On ["name"]

switches on a named group of messages.

On [s]

switches on tracing for the symbol s.

On [m1,m2,]

switches on several messages or message groups.

Details
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
See Also
Tech Notes
Related Guides
Related Workflows
History
Cite this Page

On [symbol::tag]

switches on a message, so that it can be printed.

On ["name"]

switches on a named group of messages.

On [s]

switches on tracing for the symbol s.

On [m1,m2,]

switches on several messages or message groups.

Details

  • Some messages for built-in functions are off by default, and must explicitly be switched on using On .
  • In On ["name"], possible named message groups include:
  • "Compiler" warnings associated with compiled code
    "Graphics" warnings associated with graphics generation
    "Packing" notifications associated with packed arrays
    "Spelling" spell-checking messages for symbol names
    "Symbolics" warnings associated with symbolic computation
  • $MessageGroups gives a complete list of message groups recognized by On .
  • On [General::name] switches on all messages derived from General::name.
  • When tracing is switched on, each evaluation of a symbol, on its own or as a function, is printed, together with the result.
  • Note that the tracing information is printed when a function returns. As a result, traces of recursive functions appear in the opposite order from their calls.
  • On [Assert ] switches on messages associated with assertions specified by Assert .
  • On [s] is equivalent to On [s::trace].

Examples

open all close all

Basic Examples  (2)

Turn on a message that is issued whenever a new symbol is created:

Now when a new symbol is created the message is issued:

This turns the message back off:

Messages about unpacking are off by default:

Turn them on:

Restore the default behavior:

Scope  (2)

Operations on symbols normally are done silently:

Use On to enable tracing of the symbol:

Restore the default behavior:

Turn on multiple messages:

Restore the default behavior:

See Also

Off   Quiet   Check   Assert   TracePrint   Monitor   $MessageGroups

Tech Notes

Related Workflows

History

Introduced in 1988 (1.0) | Updated in 2008 (7.0) 2010 (8.0)

Wolfram Research (1988), On, Wolfram Language function, https://reference.wolfram.com/language/ref/On.html (updated 2010).

Text

Wolfram Research (1988), On, Wolfram Language function, https://reference.wolfram.com/language/ref/On.html (updated 2010).

CMS

Wolfram Language. 1988. "On." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2010. https://reference.wolfram.com/language/ref/On.html.

APA

Wolfram Language. (1988). On. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/On.html

BibTeX

@misc{reference.wolfram_2025_on, author="Wolfram Research", title="{On}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/On.html}", note=[Accessed: 05-December-2025]}

BibLaTeX

@online{reference.wolfram_2025_on, organization={Wolfram Research}, title={On}, year={2010}, url={https://reference.wolfram.com/language/ref/On.html}, note=[Accessed: 05-December-2025]}

Top [フレーム]

AltStyle によって変換されたページ (->オリジナル) /