The FMT() function performs data formatting according to a format template. It is typically used to convert data for display or printing. The FMTS() function is identical to FMT() except that it works on each element of a dynamic array in turn, returning the result in a similarly delimited dynamic array.
The FMT() function sets the STATUS() function value to indicate whether the operation was successful. Possible values are
Operations that result in a non-zero STATUS() value return expr as the function result.
For compatibility with other systems, the FMT() function action can also be performed in QMBasic programs (but not in I-type dictionary entries) by use of a shortform notation in which the expr and fmt.spec are simply written next to each other with no operator in between.
X = FMT(A, '8R')
can be written as
X = A '8R'