OpenersNotesSection(Spacer1)Details

This message is generated by an attempt to assign a value to a protected symbol.

A symbol s is protected if (RefLink[Attributes, paclet:ref/Attributes])[s] includes (RefLink[Protected, paclet:ref/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.

(RefLink[Off, paclet:ref/Off])[message] switches off the message; (RefLink[On, paclet:ref/On])[message] switches it on. For example: (RefLink[Off, paclet:ref/Off])[General::write].

OpenersPrimaryExamplesSection(Spacer1)Examples  (3)

OpenersExampleSection0(Spacer1)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 (RefLink[Times, paclet:ref/Times])). The symbol (RefLink[Times, paclet:ref/Times]) is protected.

3 x= 21

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

Solve[3 x=21,x]

Equations are entered using lhs==rhs rather than lhs=rhs:

Solve[3 x==21,x]

The use of k+1 as an iterator generates an error when (RefLink[Do, paclet:ref/Do]) tries to assign a value to that iterator:

Do[Print[k], {k+1,5}]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[General, paclet:ref/General])}})}})