Fixed Point Intrinsic Functions - AsDisplayString Method

Convert the variable to a formatted string

Member of Fixed Point Intrinsic Functions (PRIM_LIBI.IFixedPointIntrinsics)

Parameters

NameTypeData TypeDescription
Result*Result (Optional)StringResulting string
Format*Input (Optional)EnumerationFormat of the number
Mask*Input (Optional)StringEdit mask to apply to the variable

Details

AsDisplayString returns the supplied number formatted using one of the available supplied formats.

Allowed Formats

Enum ValueDescriptionExample
BareString_LTrailing sign, zero supressione.g. 1234567.89- and 0
BareString_MTrailing sign, zero supression, blank when 0e.g. 1234567.89-
BareString_PLeading sign, zero supressione.g. -1234567.89 and 0
BareString_QLeading sign, zero supression, blank when 0e.g. -1234567.89
EditCode_1Separators, unsigned, leading zero supressione.g. 1,234,567.89000 and .00000
EditCode_2Separators, unsigned, leading zero supression, blank when 0e.g. 1,234,567.89000
EditCode_3Unsigned, leading zero supressione.g. 1234567.89000 and .00000
EditCode_4Unsigned, leading zero supression, blank when 0e.g. 1234567.89000
EditCode_ASeparators, leading zero supression, trailing CRe.g. 1,234,567.89000 CR and .00000
EditCode_BSeparators, trailing CR, leading zero supression, blank when 0e.g. 1,234,567.89000 CR
EditCode_CTrailing CR, leading zero supressione.g. 1234567.89000 CR and .00000
EditCode_DTrailing CR, leading zero supression, blank when 0e.g. 1234567.89000 CR
EditCode_JSeparators, leading zero supression, trailing signe.g. 1,234,567.89000- and .00000
EditCode_KSeparators, trailing sign, leading zero supression, blank when 0e.g. 1,234,567.89000-
EditCode_LTrailing sign, leading zero supressione.g. "1234567.89000- and .00000
EditCode_MTrailing sign, leading zero supression, blank when zeroe.g. "1234567.89000-
EditCode_NSeparators, leading zero supression, leading signe.g. -1,234,567.89000 and .00000
EditCode_NoneLeading sign, zero supressione.g. -1234567.89 and 0
EditCode_OSeparators, leading sign, leading zero supression, blank when zeroe.g. -1,234,567.89000
EditCode_PLeading sign, leading zero supressione.g. -1234567.89000 and .00000
EditCode_QLeading sign, leading zero supression, blank when zeroe.g. -1234567.89000 and .00000
EditCode_W8 digit numeric date nnnn/nn/nne.g. 2014/12/31 and 0/00/00
EditCode_XLeading sign, no zero supression, no decimale.g. -000123456789000 and 000000000000000
EditCode_Y6 or 8 digit numeric date nn/nn/nn or nn/nn/nnnne.g. 31/12/14 or 31/12/2014 and 0/00/00 or 0/00/0000
EditCode_ZLeading sign, zero supression, blank when 0e.g. -1234567.89
EditWordEdit mask as defined in the Mask parameter
NumString_LTrailing sign, no zero supressione.g. 0001234567.89000- and 0000000000.00000
NumString_MTrailing sign, no zero supression, blank when 0e.g. 0001234567.89000-
NumString_PLeading sign, no zero supressione.g. -0001234567.89000 and 0000000000.00000
NumString_QLeading sign, no zero supression, blank when 0e.g. 0001234567.89000-

Example

In this example, the number 1234567.89 would return the value "1,234,567.89"
#Result := #Number.AsDisplayString( EditCode_J )

See also

All Component Classes

Technical Reference

Febuary 18 V14SP2