The printf() and scanf() family of C runtime functions are a special case of an external interface. The format string must be transcoded when these
interfaces are called. The list of variable arguments passed to the functions may also contain string and widestring data
that needs to be transcoded and modified in format. Because of the complexity of wrapping these C runtime functions, PTC has
provided a standard Creo TOOLKIT function equivalent for each. These functions support all the format specifiers and modifiers supported by the C language
specification.
Functions Introduced:
The function ProTKPrintf() provides the Unicode equivalent to the C runtime function printf(). The number of characters returned by this function is sent to stdout. The output data is transcoded to the native encoding
format, which may result in out-of-locale characters in the results.
The function ProTKFprintf() provides the Unicode equivalent to the C runtime function fprintf(). The number of characters returned by this function are copied into the file. This file will receive the data in the Unicode-encoded
format.
The functions ProTKSprintf() and ProTKSnprintf() provide the Unicode equivalent to the C runtime functions sprintf() and snprintf() respectively. The number of characters returned by these functions are copied into the output buffer.
The function ProTKScanf() provides the Unicode equivalent to the C runtime function scanf(). This function parses the contents of the input from stdin. The output data in the string or character format is in Unicode
encoding.
The function ProTKFscanf() provides the Unicode equivalent to the C runtime function fscanf(). This function parses the contents of the input from a file.
The functions ProTKSscanf() and ProTKSnscanf() provide the Unicode equivalent to the C runtime functions sscanf() and snscanf() respectively.
The Unicode equivalent of the C runtime functions v*printf() and v*scanf(), which take a variable arguments list instead of variable number of arguments, have also been provided in the form of ProTKV*printf() and ProTKV*scanf() functions.