APLX Help : Help on APL language : System Methods : ⎕STATE Property names and values
|
|
![]() |
|
Currently implemented for Internal classes only. Syntax:
The monadic system method ⎕CR 'Circle' Circle { X←0 Y←0 COLOR←'Pale green' RADIUS←100 ∇R←Area R←(○1)×RADIUS*2 ∇ } C←⎕NEW Circle C.X←23 C.Y←12 C.⎕STATE 0 X 23 Y 12 C.⎕STATE 1 X 23 Y 12 COLOR Pale green RADIUS 100 ⎕DISPLAY C.⎕STATE 1 ┌→──────────────────────┐ ↓ ┌→┐ │ │ │X│ 23 │ │ └─┘ │ │ ┌→┐ │ │ │Y│ 12 │ │ └─┘ │ │ ┌→────┐ ┌→─────────┐ │ │ │COLOR│ │Pale green│ │ │ └─────┘ └──────────┘ │ │ ┌→─────┐ │ │ │RADIUS│ 100 │ │ └──────┘ │ └∊──────────────────────┘ This operation is known as serialization of an object. Note that, if any of the properties include a reference to another object, the state of that object will not be expanded (serialized) in the returned matrix. The operation is therefore a 'shallow' copy of the data. |
|
APLX Help : Help on APL language : System Methods : ⎕STATE Property names and values
|
Copyright © 1996-2010 MicroAPL Ltd