Chapter 3 DynaScript Predefined Objects


Number properties

The Number object has these properties:

MAX_VALUE property

Syntax

Number.MAX_VALUE 

Attributes

This property is read-only.

Description

Returns the largest positive finite value of the number type, which is approximately 1.7976931348623157e308.

Return

Integer.

Example

This example displays the largest possible number that can be used in PowerDynamo:

<!--SCRIPT
document.WriteLn( Number.MAX_VALUE );
-->

MIN_VALUE property

Syntax

Number.MIN_VALUE 

Attributes

This property is read-only.

Description

Returns the smallest positive nonzero value of the number type, which is approximately 5e-324.

Return

Integer.

Example

This example displays the smallest positive non-zero number that can be used in PowerDynamo:

<!--SCRIPT
document.WriteLn( Number.MIN_VALUE );
-->

NaN property

Syntax

Number.NaN 

Attributes

This property is read-only.

Description

A value that indicates that an arithmetic expression returned a value that was not a number.

Return

String (NaN)

Example

This example will have an output of NaN.

<!--SCRIPT
document.WriteLn( Number.NaN );
-->

NEGATIVE_INFINITY property

Syntax

Number.NEGATIVE_INFINITY 

Attributes

This property is read-only.

Description

Returns a string indicating that a number is outside the range that ECMAScript is capable of representing.

Return

String (-Infinity).

Example

This example will have an output of -Infinity :

<!--SCRIPT
document.WriteLn( Number.NEGATIVE_INFINITY );
-->

POSITIVE_INFINITY property

Syntax

Number.POSITIVE_INFINITY 

Attributes

This property is read-only.

Description

Returns a string indicating that a number is outside the range that ECMAScript is capable of representing.

Return

String (Infinity)

Example

This example will have an output of Infinity :

<!--SCRIPT
document.WriteLn( Number.POSITIVE_INFINITY );
-->

 


Copyright © 1999 Sybase, Inc. All rights reserved.