Description | The functions of the VF_write and VF_nwrite families employ internally the ANSI C function fprintf in order to print numbers into a stream.
According to the rules described in the documentation of your C compiler's printf function, the format may be specified as fits your needs. When defining a write format, one should always be aware of the restrictions imposed by the read functions (not all formats you can write will be read correcly, see VF_read).
VF_setWriteFormat should not be used for the definition of whitespace before or after the numbers. This is the task of VF_setWriteSeparate.
For details about the formats used for each of the various data types, please refer to the following table. The last column of this table gives the maximum length of the format string.
Version | Standard Format | Alternative Example | max. length |
VF_ | "% 11.8e" | "% 8.4f" | 16 |
VD_ | "% 19.16le" | "% 16.8lf" | 16 |
VE_ | "% 22.19Le" | "% 22.19LG" | 16 |
VCF_ | "% 11.8e, % 11.8e" | "{% 8.4f, % 8.4f}" | 32 |
VCD_ | "% 19.16le, % 19.16le" | "{% 19.16lE % 19.16lE}" | 32 |
VCE_ | "% 22.19Le, % 22.19Le" | "{% 22.19Lg % 22.19Lg}" | 32 |
VPF_ | "% 11.8e @% 11.8e" | "{% 8.4f @% 8.4f}" | 32 |
VPD_ | "% 19.16le @% 19.16le" | "{% 19.16lE @% 19.16lE}" | 32 |
VPE_ | "% 22.19Le @% 22.19Le" | "{% 22.19Lg @% 22.19Lg}" | 32 |
VI_ | "% 10d" | "0x% 8x" | 12 |
VBI_ | "% 3hd" | "0x% 2hX" | 12 |
VSI_ | "% 5hd" | "0x% 4hX" | 12 |
VLI_ | "% 10ld" | "%08lXh" | 12 |
VQI_ | "% 20lld" | | 16 |
VU_ | "%10u" | "%04xh" | 12 |
VUB_ | "%3hu" | "0%02ho" | 12 |
VUS_ | "%5hu" | "0%04ho" | 12 |
VUL_ | "%10lu" | "0%08lO" | 12 |
VUQ_ | "%20I64u" | | 12 |
Note that byte-sized integers are extended to 16-bit before being printed, so that the format specifier has to be for 16-bit numbers. |