Child pages
  • Number

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Divcache
Div
iddescription
HTML Table
id
classservoy sSummary
Colgroup Tag
Col
width80px
Col
Table Head (thead)
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Property Summary
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
MAX_VALUE
The largest representable number.
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)
MIN_VALUE
The smallest representable number.
Table Row (tr)
Table Cell (td)
Number
Table Cell (td)NEGATIVE_INFINITY
styleindexdisplay:none

DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY (EXCEPT INSIDE THE DIV BELOW WITH ID=DESCRIPTION), UNLESS YOU KNOW WHAT YOU'RE DOING.
THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO AUTO UPDATE THE CONTENT THROUGH THE DOC GENERATOR.

true
refresh100d
showRefreshtrue
iddoc
titleRefresh page
showDatetrue
retryEnable
id

servoy sReturnTypes2100%height: 30px;2Supported ClientssWordListSmartClientsWordListWebClientsWordListNGClientsWordListMobileClient

servoy sSummary12%30%58%height: 30px;3Property SummaryThe largest representable number.The smallest representable number.Special value representing negative infinity; returned on overflow. Table Row (tr)

Table Cell (td)
Object
Table Cell (td)NaN
Table Cell (td)POSITIVE_INFINITY
Special "not a number" value. Table Row (tr)
Table Cell (td)
Number
Special value representing infinity; returned on overflow. HTML Table

classservoy sSummaryid

Colgroup Tag
Col
width80px
Col
Table Head (thead) Table Row (tr)style Table Row (tr)
Table Cell (td)
String
Table Cell (td)toExponential()
servoy sSummary12%30%58%height: 30px;
Table Head (th)
colspan2
Method Summary
Table Cell (td)
String
Table Cell (td)toExponential(fractionDigits)
3Methods SummaryReturns a string representing the number in exponential notation. Table Row (tr)
Table Cell (td)
String
Table Cell (td)toFixed()
Returns a string representing the number in exponential notation. Table Row (tr) Table Cell (td)toFixed(digits)
Returns a string representing the number in fixed-point notation. Table Row (tr)
Table Cell (td)
String
toLocaleString()
Returns a string representing the number in fixed-point notation. Table Row (tr)
Table Cell (td)
String
Table Cell (td)Converts the number into a string which is suitable for presentation in the given locale. Table Row (tr)
Table Cell (td)
String
Table Cell (td)toPrecision()
Returns a string representing the number to a specified precision in fixed-point or exponential notation. Table Row (tr)
Table Cell (td)
String
Table Cell (td)toPrecision(precision)
Table Row (tr)
Table Cell (td)
String
Table Cell (td)toString()
Returns a string representing the number to a specified precision in fixed-point or exponential notation.
Table Cell (td)
String
Table Cell (td)toString(radix)
Returns a string representing the specified Number object. Table Row (tr)Returns a string representing the specified Number object.

HTML Table

propertyclass Colgroup Tag Colcolspanservoy sDetail2width100%

Col
Table Head (thead) Table Row (tr)styleheight:30px; Table Head (th)colspan2Property Details Table Body (tbody)ididMAX_VALUE Table Row (tr)name

Table Cell (td)id

MAX_VALUE

Table Row (tr)des Table Cell (td) DivclasssIndentThe largest representable number. Table Row (tr)idret

Table Cell (td)

Returns

div Table Body (tbody)
idMIN_VALUE
Table Row (tr)
idname
Table Cell (td)

MIN_VALUE

Table Row (tr)
iddes
Table Cell (td) Div
classsIndent
sIndentclients

classsIndent
Number
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
application.output("Largest number: " + Number.MAX_VALUE);
Table Row (tr)
classlastDetailRow
Table Cell (td)
 

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 
MIN_VALUEname

MIN_VALUE

dessIndentThe smallest representable number.
Table Row (tr)idret

Table Cell (td)

Returns

div Table Cell (td) Div
classsIndent
sIndentclients

classsIndent
Number
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
application.output("Smallest number: " + Number.MIN_VALUE);
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idNEGATIVE_INFINITY
Table Row (tr)
idname
Table Cell (td)

NEGATIVE_INFINITY

Table Row (tr)
iddes

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 
NEGATIVE_INFINITYname

NEGATIVE_INFINITY

dessIndentSpecial value representing negative infinity; returned on overflow.
Table Row (tr)idret

Table Cell (td)

Returns

div Table Cell (td) Div
classsIndent
sIndentclients

classsIndent
Number
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
application.output("Negative infinity: " + Number.NEGATIVE_INFINITY);
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idNaN
Table Row (tr)
idname
Table Cell (td)

NaN

Table Row (tr)
iddes

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 
NaNname

NaN

dessIndentSpecial "not a number" value.
Table Row (tr)idret

Table Cell (td)

Returns

div Table Cell (td) Div
classsIndent
sIndentclients

classsIndent
Object
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
application.output("NaN: " + Number.NaN);
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idPOSITIVE_INFINITY
Table Row (tr)
idname
Table Cell (td)

POSITIVE_INFINITY

Table Row (tr)
iddes

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 
POSITIVE_INFINITYname

POSITIVE_INFINITY

dessIndentSpecial value representing infinity; returned on overflow.
Table Row (tr)idret

Table Cell (td)

Returns

div
Colgroup Tag
Col
colspan2
width100%
Col
Table Head (thead)
Table Row (tr)
styleheight: 30px;
Table Head (th)
colspan2
Method Details
Table Body (tbody)
idtoExponential
Table Row (tr)
idname
Table Cell (td)

toExponential

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
toExponential
Span
()
Table Row (tr)
iddes
Table Cell (td) Div
classsIndent
sIndentclients

classsIndent
Number
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
application.output("Positive infinity: " + Number.POSITIVE_INFINITY);
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
HTML Table
idfunction
classservoy sDetail

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 

functionservoy sDetail2100%height:30px2Methods DetailstoExponentialname

toExponential()

dessIndentReturns a string representing the number in exponential notation.
Table Row (tr)idret

Table Cell (td)

Returns

div
idtoExponential-Number
Table Row (tr)
idname
Table Cell (td)

toExponential

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
toExponential
Span
(fractionDigits)
Table Row (tr)
iddes
Table Cell (td) Div
classsIndent
sIndentclients

classsIndent
String - A string representing the number in exponential notation.
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
var n = 123.45678;
application.output(n.toExponential(3));
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 
toExponentialname

toExponential(fractionDigits)

dessIndentReturns a string representing the number in exponential notation.
Table Row (tr)idtdprs

Parameters

div

classsIndent{Number} fractionDigits - An integer specifying the number of digits after the decimal point. Defaults to as many digits as necessary to specify the number. Table Row (tr)idret

Table Cell (td)

Returns

div Table Body (tbody)
idtoFixed
Table Row (tr)
idname
Table Cell (td)

toFixed

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
toFixed
Span
()
Table Row (tr)
iddes
Table Cell (td) Div
classsIndent
sIndentclients

classsIndent
String - A string representing the number in exponential notation.
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
var n = 123.45678;
application.output(n.toExponential(3));
Table Row (tr)
classlastDetailRow
Table Cell (td)
 

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 
toFixedname

toFixed()

dessIndentReturns a string representing the number in fixed-point notation.
Table Row (tr)idret

Table Cell (td)

Returns

divsIndentclients

classsIndent
String - A string representing the number in fixed-point notation.
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
var n = 123.45678;
application.output(n.toFixed(3));
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idtoFixed-Number
Table Row (tr)
idname
Table Cell (td)

toFixed

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
toFixed
Span
(digits)
Table Row (tr)
iddes
Table Cell (td) Div
classsIndent

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 
toFixedname

toFixed(digits)

dessIndentReturns a string representing the number in fixed-point notation.
Table Row (tr)idprs

Table Cell (td)

Parameters

Divclass{Number}

sIndentdigits - The number of digits to appear after the decimal point. Defaults to 0. Table Row (tr)idret

Table Cell (td)

Returns

divsIndentclients

classsIndent
String - A string representing the number in fixed-point notation.
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
var n = 123.45678;
application.output(n.toFixed(3));
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idtoLocaleString
Table Row (tr)
idname
Table Cell (td)

toLocaleString

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
toLocaleString
Span
()
Table Row (tr)
iddes
Table Cell (td) Div
classsIndent

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 
toLocaleStringname

toLocaleString()

dessIndentConverts the number into a string which is suitable for presentation in the given locale.
Table Row (tr)idret

Table Cell (td)

Returns

divsIndentclients

classsIndent
String - A string representing the number in the current locale.
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
var n = 1000000;
application.output(n.toLocaleString());
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idtoPrecision
Table Row (tr)
idname
Table Cell (td)

toPrecision

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
toPrecision
Span
()
Table Row (tr)
iddes
Table Cell (td) Div
classsIndent
Table Row (tr)id

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 
toPrecisionname

toPrecision()

dessIndentReturns a string representing the number to a specified precision in fixed-point or exponential notation.
ret

Table Cell (td)

Returns

div
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
var n = 123.45678;
application.output(n.toPrecision(5));
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idtoPrecision-Number
Table Row (tr)
idname
Table Cell (td)

toPrecision

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
toPrecision
Span
(precision)
Table Row (tr)
iddes
Table Cell (td) Div
classsIndent
sIndentclients

classsIndent
String - A string representing the number to a specified precision in fixed-point or exponential notation. Table Row (tr)id

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 
toPrecisionname

toPrecision(precision)

dessIndentReturns a string representing the number to a specified precision in fixed-point or exponential notation.
prs

Table Cell (td)class

Parameters

DivsIndent{Number} precision - Table Row (tr)idAn integer specifying the number of significant digits.tdret

Returns

div
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
var n = 123.45678;
application.output(n.toPrecision(5));
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idtoString
Table Row (tr)
idname
Table Cell (td)

toString

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
toString
Span
()
Table Row (tr)
iddes
Table Cell (td) Div
classsIndent
sIndentclients

classsIndent
String - A string representing the number to a specified precision in fixed-point or exponential notation.

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 
toStringname

toString()

dessIndentReturns a string representing the specified Number object.
Table Row (tr)idtdret

Returns

divsIndentclients

classsIndent
String - A string representing the specified Number object.
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
var n = 7;
application.output(n.toString()); //displays "7"
application.output(n.toString(2)); //displays "111"
Table Row (tr)
classlastDetailRow
Table Cell (td)
 
Table Body (tbody)
idtoString-Number
Table Row (tr)
idname
Table Cell (td)

toString

Table Row (tr)
idsig
Table Cell (td)
Span
stylemargin-right: 5px;
String
Span
stylefont-weight: bold;
toString
Span
(radix)
Table Row (tr)
iddes
Table Cell (td) Div
classsIndent

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow 
toStringname

toString(radix)

dessIndentReturns a string representing the specified Number object.
Table Row (tr)idtdprs

Parameters

div

classsIndent{Number} radix - An integer between 2 and 36 specifying the base to use for representing numeric values Table Row (tr)idtdret

Returns

div
Table Row (tr)
idsam
Table Cell (td)

Sample

Div
classsIndent
Code Block
languagejavascript
var n = 7;
application.output(n.toString()); //displays "7"
application.output(n.toString(2)); //displays "111"
Table Row (tr)
classlastDetailRow
Table Cell (td) sIndentclients

classsIndent
String - A string representing the specified Number object.

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow