Source R←⎕SRC Y
⎕SRC returns the script that defines the scripted object Y.
Y must be a reference to a scripted object. Scripted objects include Classes, Interfaces and scripted Namespaces.
R is a vector of character vectors containing the script that was used to define Y.
)ED ○MyClass
:Class MyClass
∇ r←foo arg
:Access public shared
r←1+arg
∇
:EndClass
z←⎕SRC MyClass
⍴z
6
⍴¨z
14 15 27 13 5 9
⍪z
:Class MyClass
∇ r←foo arg
:Access public shared
r←1+arg
∇
:EndClass
Note
The only two ways to permanently alter the source of a scripted object are to change the object in the editor, or by refixing it using ⎕FIX. A useful technique to ensure that a scripted object is in sync with its source is to ⎕FIX ⎕SRC ref, where ref is an object reference.