System Function VR

From NARS2000
Revision as of 18:17, 8 May 2009 by WikiSysop (talk | contribs)
Jump to navigationJump to search
Z←⎕VR R returns the visual representation of the user-defined function or operator named in R.
R is a character scalar or vector.
Z is a character vector representation of the user-defined function/operator.


This function is implemented via the Magic Function #MonVR.

For example,

      ⎕VR '#MonVR'
    ∇ Z←#MonVR R;⎕io
[1]   ⎕io←0
[2]   Z←1 ⎕cr R
[3]   →(0≠⍴Z)/L1 ⋄ Z←'' ⋄ →0
[4]   L1:→(1=≡Z)/0
[5]   Z←(∊((⊂[1]'LO<    ∇>P<[>Q<]>I6' ⎕fmt ⍳⍴Z),¨Z),¨⊂⎕TCNL,⎕TCLF),'    ∇'
    ∇

If the function named in R is directly assigned, the result is the character vector representation of that function (see line 4 above), as in

      f←+.×
      ⍴⎕←⎕vr 'f'
+.×
3