# Is there any difference between Quiet and InternalDeactivateMessages?

Both Quiet and InternalDeactivateMessages seem to suppress error messages. Does anyone have any experience with them and found any real differences?

• I don't know what the difference are, but Quiet is invalid in parallel calculations. Maybe you can exam if the later one is invalid as well? – Turgon Sep 11 '16 at 4:34

InternalDeactivateMessages[expr, msg1, msg2, ...] evaluates expr after turning off the given messages. When the second argument is not present (or All) then expr is evaluated in a special mode that does not generate any messages.

An example of a difference would be

InternalDeactivateMessages[On[Power::infy]; 1/0, Power::infy]

(* gives a message *)

Quiet[On[Power::infy]; 1/0, Power::infy]

(* does not give a message *)


InternalDeactivateMessages is the older and the simpler function. Quiet has been introduced in version 6.0 and is more sophisticated, as it also has the form

Quiet[expr, msgoff, msgon]


indicating that the messages in the list msgoff should not be generated, but those in msgon should be. Since there can be arbitrary nesting, Quiet acts similarly to a scoping construct, keeping track of the wanted/unwanted messages at each level.

I think the main reason InternalDeactivateMessages still exists is backward compatibility. There should be no advantage in using it instead of the documented Quiet.