Version 1 of int

Updated 2006-11-30 16:16:56

[discuss tcl variable type of int - how much data fits in that amount, when does tcl use it, when does it benefit the user, etc.]

The expr-function int returns the 32-bit integer value of a number.

 % expr {int(- pow(2,31))}
 -2147483648
 % expr {int(pow(2,31)-1)}
 2147483647
 % expr {int(pow(2,31))}
 integer value too large to represent
 %

Category Glossary