Next: , Previous: , Up: Programming Types   [Contents][Index]


8.4.1 Integer Type

The range of values for integers in SXEmacs Lisp is -134217728 to 134217727 (28 bits; i.e., to on most machines. (Some machines, in particular 64-bit machines such as the DEC Alpha, may provide a wider range.) It is important to note that the XEmacs Lisp arithmetic functions do not check for overflow. Thus (1+ 134217727) is -134217728 on most machines. (However, you will get an error if you attempt to read an out-of-range number using the Lisp reader.)

The read syntax for integers is a sequence of (base ten) digits with an optional sign at the beginning. (The printed representation produced by the Lisp interpreter never has a leading ‘+’.)

-1               ; The integer -1.
1                ; The integer 1.
+1               ; Also the integer 1.
268435457        ; Causes an error on a 28-bit implementation.

See Numbers, for more information.