WOLFRAM LANGUAGE MESSAGE

General::write

DetailsDetails

  • This message is generated by an attempt to assign a value to a protected symbol.
  • A symbol s is protected if Attributes[s] includes Protected.
  • An assignment tag is the symbol to which an assignment attaches an evaluation rule.
  • A function::write message can be generated indirectly by any function that makes assignments.
  • Off[message] switches off the message; On[message] switches it on. For example: Off[General::write].

ExamplesExamplesopen allclose all

Basic Examples  (3)Basic Examples  (3)

An error occurs because the expression 3x on the left-hand side of the assignment is a product (an expression with a head of Times). The symbol Times is protected.

In[1]:=
Click for copyable input
Out[1]=

The same message is generated if this assignment occurs within another expression:

In[1]:=
Click for copyable input
Out[1]=

Equations are entered using rather than :

In[2]:=
Click for copyable input
Out[2]=

The use of k+1 as an iterator generates an error when Do tries to assign a value to that iterator:

In[1]:=
Click for copyable input
Out[1]=