CNumStr (NS)

<< Click to Display Table of Contents >>

Manual > Control Reference > Route > Route Methods >

CNumStr (NS)


 

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.

 


hmtoggle_plus1Explanation


Supported


Script Action

Browser script

Calculation Expression Syntax

 

 


reference