|
Creates a numeric string specified by the format.
syntax
CNumStr(
num,
precision
[,width = 0]
[,zerosuppress = TRUE]
[,showplus = FALSE]
[,header = ""]
[,footer = ""]
[,comma = FALSE]
)
Parameters
num
|
|
Type:
|
Number
|
|
A number.
|
precision
|
|
Type:
|
Number
|
|
The number of decimal places.
|
width
|
|
Type:
|
Number
|
|
Total number of characters. If the number of characters is insufficient, zeros or spaces will be added to the beginning according to zerosuppress. If width is 0, nothing will be added.
|
zerosuppress
|
|
Type:
|
Boolean
|
|
TRUE - If the number of digits is not equal to width, the leading part will be padded with spaces.
FALSE - If the number of digits is not enough to fit width, the leading zeros will be inserted.
When width is 0, nothing is added.
|
showplus
|
|
Type:
|
Boolean
|
|
TRUE - Add a + sign when the value is 0 or greater.
FALSE - When the value is 0 or greater, no + sign is added.
|
header
|
|
Type:
|
character
|
|
The character to prepend.
|
footer
|
|
Type:
|
character
|
|
The character to append to the end.
|
comma
|
|
Type:
|
Boolean
|
|
TRUE hours, with commas separating every three digits.
|
Return Value
|
|
Type:
|
character
|
|
A numeric string.
|
Explanation
Creates a numeric string according to a format.
|
Supported
reference
CBool
CNum
CStr
CBit
CTime
CScript
CScriptTo
CNumToLocale (NL)
CLocaleToNum (LN)
CTimeToLocale (TL)
CLocaleToTime (LT)
DST
CNumStr (NS)
CTimeStr (TS)
CTimeSpanStr
CNumToHex
CNumToOct
CNumToBin
CNumToExp
CHexToNum
COctToNum
CBinToNum
CNumToComma
CCommaToNum
CLinearToPf
CPfToLinear
CTable
CValidTable
|