...
- Expression is either a numeric or a string expression;
- Format$ is a string containing the format instructions.
The following values are possible: - Numeric expression:
- "Ix" -> integer (=I) with x positions:
FORMAT$(Pi,"I3") returns " 3" - "Ex.y" -> exponential format (=E), x positions for total number, y decimal positions:
FORMAT$(Pi,"E12.3") returns " 0.314E+01" - "Fx.y" -> fixed format (=F), x positions for total number, y decimal positions:
FORMAT$(Pi,"F12.3") returns " 3.142"
- String expression:
- Ax -> ASCII text (=A) with x positions:
FORMAT$("Qnowledge Wageningen","A25") returns "Qnowledge Wageningen "
- Special actions:
- The full value for all formats is returned, also if the indicated cell length is too small to contain the value. E.g.
FORMAT$("Qnowledge Wageningen","A6") returns returns "Qnowledge Wageningen" - Furthermore, note that by default numbers are aligned to the right and strings are aligned to the left.
Quick links: Function Functions overview | Attribute overview | Constants overview | Dimensions overview