String function FORMAT
If there is insufficient information on this page and you wish learn more about FORMAT, please send an email to firstname.lastname@example.org. You can help to improve information about FORMAT by submitting an article using the comments link below. Note, an offline language reference text file is now avialable – see the Download section.
- ‘#’ Digit or space
- 0 Digit or zero
- ^ Stores a number in exponential format. Unlike QB’s USING format this is a place-holder like #.
- . The position of the decimal point.
- , Separator.
- - Stores minus if the number is negative.
- + Stores the sign of the number.
- & Stores a string expression without reformatting it.
- ! Stores only the first character of a string expression.
- \\ Stores only the first n + 2 characters of a string expression, where n is the number of spaces between the two backslashes. Unlike QB, there can be literals inside the \ \. These literals are inserted in the final string.
? FORMAT("#,##0", 1920.6) : REM prints 1,921 ? FORMAT("\ - \", "abcde") : REM prints "abc-de"