Values in SenseTalk
Computers deal with a wide variety of data values, including numbers, text, sound, and pictures. The values you will work with the most in SenseTalk are numbers and text. The ability to combine and organize these values in various ways is also important. SenseTalk’s lists and property lists let you do this.
Numbers
Numbers in SenseTalk can be written using numerals:
1
634
12.908
-3
.5
18.75
or as words:
one
six hundred thirty-four
twelve point nine zero eight
negative three
one half
eighteen and three quarters
You can't use commas in numbers to separate groups of digits, because commas have other meanings in SenseTalk, such as separating the items in a list. However, you can use underscores (_) within a number to make a large number more readable (the underscores are simply ignored by SenseTalk). So, the number “one million three hundred thousand” can be written out in words or as 1_300_000 but can’t be written as 1,300,000. (For more information about lists, see lists, below.)
For technical applications, the following notation is also accepted:
- Scientific notation (containing "e+" or "e-" followed by the power of 10)
- Hexadecimal, octal, and binary notation (beginning with "0x", "0o", and "0b").
4.58e+6
0x8ce3
0o377
0b10011010
You can also use unit designations with numbers, such as for length or distance, weight, or angles:
100 yards
5 pounds
12 minutes
For a full discussion of units, see Using Numbers with Units.