APLX Help : Help on APL language : System Functions & Variables : ⎕TF Transfer Form
|
|
![]() |
|
The dyadic system function Name Description Type Code 'F' for function 'N' for a numeric array 'C' for a character array Name Name of the object, followed by a blank Rank Character form of the rank of the object Shape Character form of the shape of the object followed by a blank Data Character form of the object The standard transfer form cannot be used for mixed or nested variables or for user-defined operators. The extended transfer form is a character string which, if executed, would reconstitute the item in question. If the See also the SIMPLE←'TEXT STRING' (Sample data) MIXED←'ABC' (2 2⍴⍳4) ∇R←A FN B [1] R←A ÷ B [2] ∇ Encoding items: 1 ⎕TF 'SIMPLE' (Standard transfer form) CSIMPLE 1 11 TEXT STRING (Character, rank 1, shape 11) 1 ⎕TF 'MIXED' (Standard transfer form won't work on mixed) 1 ⎕TF 'FN' FFN 2 2 8 R←A FN BR←A÷B (Function called FN, rank 2, shape 2 8) 2 ⎕TF 'SIMPLE' (Extended transfer form) SIMPLE←'TEXT STRING' 2 ⎕TF 'MIXED' MIXED←('ABC') (2 2⍴1 2 3 4) 2 ⎕TF 'FN' ⎕FX 'R←A FN B' 'R←A÷B' 1 ⎕TF '⎕WA' (Similar format to encode system variables) N⎕WA 0 740322 2 ⎕TF '⎕WA' ⎕WA←740322 1 ⎕TF '⎕PW' N⎕PW 0 80 2 ⎕TF '⎕TS' ⎕TS←1990 5 31 0 36 52 734 Decoding objects: TF1←1 ⎕TF 'SIMPLE' TF2←2 ⎕TF 'MIXED' )ERASE SIMPLE MIXED (Remove the original objects) )VARS TF1 TF2 1 ⎕TF TF1 (Successful decode - name returned) SIMPLE )VARS SIMPLE TF1 TF2 (Object reappears) 1 ⎕TF TF2 (Attempt to decode an extended version) (Empty vector and no object) )VARS SIMPLE TF1 TF2 2 ⎕TF TF2 (Decode using the correct, extended form) MIXED |
|
APLX Help : Help on APL language : System Functions & Variables : ⎕TF Transfer Form
|
Copyright © 1996-2010 MicroAPL Ltd