Warnings and Messages

The Wolfram System usually goes about its work silently, giving output only when it has finished doing the calculations you asked for.

However, if it looks as if the Wolfram Language is doing something you definitely did not intend, the Wolfram System will usually print a message to warn you.

The square root function should have only one argument. The Wolfram System prints a message to warn you that you have given two arguments here:

Sqrt[4,5]

You can suppress the message for one evaluation using (RefLink[Quiet, paclet:ref/Quiet]):

Quiet[Sqrt[4,5]]

The message reappears without the use of (RefLink[Quiet, paclet:ref/Quiet]):

Sqrt[4,5]

Each message has a name. You can switch off messages for all evaluations using (RefLink[Off, paclet:ref/Off]):

Off[Sqrt::argx]

The message (RefLink[Sqrt, paclet:ref/Sqrt])::argx has now been switched off, and will no longer appear:

Sqrt[4,5]

This switches (RefLink[Sqrt, paclet:ref/Sqrt])::argx back on again:

On[Sqrt::argx]

Functions for controlling message output.