|expression||An expression defining the value type. This may be the name of a data field, passed parameter, function, or Attribute providing the value type (including RECORD structures). This must be a legal expression for the current scope but is not evaluated for its value.|
The TYPEOF declaration allows you to define an Attribute or parameter whose value type is "just like" the expression. It is valid for use anywhere an explicit value type is valid.
Its most typical use would be to specify the return type of a TRANSFORM function as "just like" a dataset or recordset structure.
STRING3 Fred := 'ABC'; //declare Fred as a 3-byte string TYPEOF(Fred) Sue := Fred; //declare Sue as "just like" Fred
See Also: TRANSFORM Structure