General::write
更多信息
-
- 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].
范例
基本范例 (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.
![](Files/write.zh/2.gif)
The same message is generated if this assignment occurs within another expression:
![](Files/write.zh/3.gif)
![](Files/write.zh/4.gif)
Equations are entered using lhs==rhs rather than lhs=rhs:
The use of k+1 as an iterator generates an error when Do tries to assign a value to that iterator:
![](Files/write.zh/5.gif)