The msgSetx functions encode numeric values in the most concise format that will describe the supplied value. Sometimes, however, a specific format is required; for example, the message may form part of a table. More precise control can be obtained by using the msgFmt function to provide all the standard sprintf() formats available from the standard C library.
msgFmt( token, format, ... );
and the previous example could be written as:
msgFmt( "FLUX", "%5.2f", flux );
msgSetc( "FLUX", funits );
msgOut( "EXAMPLE_RESULT",
"Emission flux is ^FLUX", status );
There is no restriction on the number of formats that can be included in a single call so the above example can be simplified further:
msgFmt( "FLUX", "%5.2f %s", flux, funits );
msgOut( "EXAMPLE_RESULT",
"Emission flux is ^FLUX", status );
MERS (MSG and ERR) Message and Error Reporting Systems