|Home | Tutorial | Classes | Functions | QSA Workbench | Language | Qt API | QSA Articles Qt Script for Applications

[Prev: Function Type] [Home] [Next: Object]

Number

A Number is a datatype that represents a number. In most sittuations, programmers will use numeric literals like 3.142 directly in code. The Number datatype is useful for obtaining system limits, e.g. MIN_VALUE and MAX_VALUE, and for performing number to string conversions with toString()

Number Construction

Numbers are not normally constructed, but instead created by simple assignment, e.g.

    var x = 3.142;
Number Properties

A numeric variable can hold a non-numeric value, in which case isNaN() returns true. The result of an arithmetic expression may exceed the maximum or minimum representable values in which case the value of the expression will be Infinity, and isFinite() will return false.

Number Functions

[Prev: Function Type] [Home] [Next: Object]


Copyright © 2001-2006 TrolltechTrademarks
QSA version 1.1.5