#TEXT

#TEXT( argument );

argumentThe MACRO parameter whose text to supply.

The #TEXT statement returns the text of the specified argument to the MACRO. This statement may be used outside an XML scope and does not require a previous LOADXML to instantiate an XML scope.

Example:

extractFields(ds, outDs, f1, f2='?') := MACRO
  
  #UNIQUENAME(r);
  
  %r% := RECORD
    f1 := ds.f1;
    #IF (#TEXT(f2)<>'?')
      #TEXT(f2)+':';
      f2 := ds.f2;
    #END
  END;
  outDs := TABLE(ds, %r%);
ENDMACRO;
 
extractFields(people, justSurname, lastname);
OUTPUT(justSurname);
extractFields(people, justName, lastname, firstname);
OUTPUT(justName);

See Also: MACRO