THIS 22.1
Format
Format
From T/HIS 9.3 onwards, the format used to display the value can be controlled by adding an optional "format" keyword after the property to be output and any additional inputs that property requires. The format should be specified directly after the "format" keyword and should use standard "C" programming syntax to specify a floating point format using either f,e,E,g or G format specifiers.
| e.g. | tab output.txt | head | max | max y of curve #1 | |
| (file output.txt) | (curve tag) | (maximum Y) | (description) | ||
| tab output.txt | head | max | format %6.3f | max y of curve #1 | |
| (file output.txt) | (curve tag) | (maximum Y) | (format) | (description) | |
| tab output.txt | head | max | format %.3f | max y of curve #1 | |
| (file output.txt) | (curve tag) | (maximum Y) | (format) | (description) |
Example formats
| Number | Format | Output |
| 12.3456 | %5.2f | 12.35 |
| 12.3456 | %7.3e | 1.2345e+01 |
| 12.3456 | %7.3E | 1.2345E+01 |
| 2345678.9 | %.0f | 2345678 |
| 2345678.9 | %6.5g | 2.3457e+06 |
| 2345678.9 | %6.5G | 2.3457E+06 |
| -0.000013583 | %4.3e | -1.358E-05 |