CFile:Printf
The Printf method writes formatted output to the file wrapped by this CFile object. This method provides functionality like the fprintf function in the C language.
bResult = CFile:Printf( sFmt, ... ) |
sFmt is a format string.
... refers to an optional variable argument list. (see Remarks)
On success, this method returns true.
On failure, this method returns false.
Printf takes 1 or more arguments. The first argument is a string that may be either the value to print or a format to be used for interpreting any additional arguments. Additional arguments provide values for the % fields embedded in the format string. The syntax of this function is compatible with the fprintf function in C; for details about specifying the format string, refer to documentation for fprintf or printf in the C or C++ language.
Suppose a CFile named F exists and the file is open for writing. The script below writes formatted text to the file using the Printf method:
|
|
|
-- do formatted print to the file |
|
-- make sure the data are in the file |
CFile class, Sprintf, global Printf, Wprintf
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics,
Inc. All Rights Reserved.