Lingo Dictionary > L-N > maxInteger

 

maxInteger

Syntax

the maxInteger

Description

System property; returns the largest whole number that is supported by the system. On most personal computers, this is 2,147,483,647 (2 to the thirty-first power, minus 1).

This property can be useful for initializing boundary variables before a loop or for limit testing.

To use numbers larger than the range of addressable integers, use floating-point numbers instead. They aren't processed as quickly as integers, but they support a greater range of values.

Example

This statement generates a table, in the Message window, of the maximum decimal value that can be represented by a certain number of binary digits:

on showMaxValues
	b = 31
	v = the maxInteger
	repeat while v > 0
		put b && "-" && v
		b = b-1
		v = v/2
	end repeat
end