|Home | Tutorial | Classes | Functions | QSA Workbench | Language | Qt API | QSA Articles | Qt Script for Applications | ![]() |
[Prev: Function Type] [Home] [Next: Object]
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()
Numbers are not normally constructed, but instead created by simple assignment, e.g.
var x = 3.142;
MAX_VALUE : Number; The maximum value for floating point values.
MIN_VALUE : Number; The minimum value for floating point values.
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.
toString() : String; Returns the number as a string value.
[Prev: Function Type] [Home] [Next: Object]
Copyright © 2001-2006 Trolltech | Trademarks | QSA version 1.1.5
|