Quiet

Quiet[expr]

evaluates expr "quietly", without actually outputting any messages generated.

Quiet[expr,{s1::t1,s2::t2,}]

quietens only the specified messages during the evaluation of expr.

Quiet[expr,"name"]

quietens only the named group of messages.

Details

  • Quiet has attribute HoldAll.
  • Quiet[expr,moff,mon] specifies that messages in the list moff should not be generated, but those in mon should be.
  • Explicit message names of the form s::t can be mixed with named message groups.
  • Quiet constructs can be nested; the innermost specification for a particular message is the one used.
  • The operation of Check and related message functions is not affected by being inside Quiet.
  • If Quiet is used inside functions like Check, messages suppressed by Quiet are not tested by Check.
  • In Quiet[expr,"name"], possible named message groups are given by $MessageGroups.
  • Quiet[expr] is equivalent to Quiet[expr,All]. Quiet[expr,None,All] switches on all messages.

Examples

open allclose all

Basic Examples  (1)

Evaluate without generating messages:

Evaluate with the message:

Scope  (3)

Switch off a specific message:

Switch off a class of messages:

Quiet constructs can be nested:

Applications  (1)

Use Check and Quiet to provide values for arguments where a function is not applicable:

This function simply returns its argument if its argument is a string of length less than four:

Without the Check and Quiet, the middle input would have returned unevaluated with a message:

Properties & Relations  (1)

If Quiet is used inside Check, messages suppressed by Quiet are not tested by Check:

However, the operation of Check is not affected by being inside Quiet:

Possible Issues  (1)

Quiet suppresses messages during the evaluation:

It does not quiet messages that occur during formatting:

Wolfram Research (2007), Quiet, Wolfram Language function, https://reference.wolfram.com/language/ref/Quiet.html (updated 2008).

Text

Wolfram Research (2007), Quiet, Wolfram Language function, https://reference.wolfram.com/language/ref/Quiet.html (updated 2008).

CMS

Wolfram Language. 2007. "Quiet." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2008. https://reference.wolfram.com/language/ref/Quiet.html.

APA

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

BibTeX

@misc{reference.wolfram_2024_quiet, author="Wolfram Research", title="{Quiet}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/Quiet.html}", note=[Accessed: 11-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_quiet, organization={Wolfram Research}, title={Quiet}, year={2008}, url={https://reference.wolfram.com/language/ref/Quiet.html}, note=[Accessed: 11-November-2024 ]}