Programming Basics - Types of Variables
Integers
- Whole Numbers only, no decimals or fractions
- If you only give lisp integers, you will only get back integers
- i.e. divide 15 by 10 ? (/ 15 10) returns 1
Reals
- Numbers with decimals, also called Floats (floating point)
- If you give lisp any real numbers at all, you will get back real numbers [i.e. (divide 15.0 by 10) ? (/ 15.0 10) returns 1.5]
- Real numbers less than one MUST have leading zeros,
- (setq VAR .5) will cause a invalid dotted pair error