Message
Usage
Notes
Further Examples
You can mimic all aspects of the way in which built-in Mathematica functions generate messages with Message. You can for example switch on and off messages using On and Off and Message will automatically look for General::tag if it does not find the specific message s::tag This defines the text of a message associated with f.
In[1]:=
|
Out[1]=
|
Here is the function f.
In[2]:=
|
When the argument of f is greater than 10, the message is generated.
In[3]:=
|
Out[3]=
|
This switches off the message.
In[4]:=
|
Now the message is no longer generated.
In[5]:=
|
Out[5]=
|
In[6]:=
|
|