FORMAT
$ Fixed or floating dollar sign.
9 Decimal digit (no zero suppress).
Z Zero-suppressed decimal digit.
, Comma. Inserted where specified.
. Decimal point position.
- Dash character. Inserted where specified.
/ Slash character. Inserted where specified.
% Percent character. Inserted where specified.
X Character data. Each X represents one character.
G Graphic data. Each G represents one logical (double byte) character.
B Blank data. Insert a space at this point.
Examples
FORMAT '999999' Data: 08777 Result: 008777
FORMAT 'ZZZZZ9' Data: 08777 Result: 8777
FORMAT '999-9999' Data: 6495252 Result: 649-5252
FORMAT 'X(3)' Data: 'Smith' Result: Smi
FORMAT '$$9.99' Data: 85.65 Result: $85.65
FORMAT '999.99' Data: 85.65 Result: 085.65
FORMAT 'X(3)' Data: 85.65 Result: Error
阅读(734) | 评论(2) | 转发(0) |