This function is is analagous to the C language 'sprintf' function; its purpose is to convert numerical data stored in binary form in a Variant into readable text returned in a mcobjTypeCHAR.
Only the first argument, the Variant to convert, is required. In this default formating case you will get a reasonable default conversion with a compact representation of each number. For numeric sources, if the array length to be converted is greater than one, then each value in the array is separated by one space. No leading or trailing space appears, and each row of two (or higher) dimensional arrays is separated by a carriage-return/line-feed, vbCrlf, pair. For String scalar or array sources, the default is to separate each string after the first by a vbCrlf, thus placing each string on its own line.
The default will work for most cases, but substantial flexibilty in the output format of the Variant to be converted is supported. The conversion format for each value can be specified (using C's sprintf formating rules). You can also specify strings to be to be placed before and/or after all numbers (or source text strings), a string to be place between multiple values of a vector (or between individual characters of source text strings) and a string to be placed between the rows of multi-dimensional vectors (or between succesive strings in a source array of them).
When converting scalar values or user-defined-types to text, consider using McSprintf instead of McToText. McSprintf can deal with an arbitrary number of arguments and allows you to specify a formatting string for all arguments together.
If the number of elements in the varFormat array is less than five or if any element is a blank string, then a default is used for the missing rows. The default is to separate numeric array elements by spaces and to place a line-break between the rows of 2-D arrays or arrays of strings.
If varFormat is given, the user is responsible for matching the each-value formatting string (element 0 of varFormat) to the Variant data type. Default formats for each basic data type (and types derived therefrom) are: CHAR c, LONG d, SHORT hd, BYTE d, FLOAT or REAL %g.