HomeContents: |
## 9.9.3 Literal## Definition and examplesA literal is "a syntactic representation of the form of the referent". That is, it shows the form of the referent. For example: [Number: 18] [String: 'abcdefg'] [Measure: <18, cm>] ## The three kinds of literalsThere are three kinds of literals: - A number
- A string
- An
*encoded literal*
All three kinds are exemplified in the above examples. The string is "'abcdefg'", while the encoded literal is "<18, cm>". ## Encoded literalsThe encoded literal has the following form: <literal, string> where the string designates the unit of the literal. Other examples include: [Temperature: <37.5, DegreesCelsius> ] "There is a temperature, which is 37.5 degrees Celsius." [Number: <12, Rhino>] "There is a number, which is 12 rhinos." [Measure: <2.54, cm> ] "There is a measure, which is 2.54 cm." ## Difference between "18" and "@18" Note how there is a difference between the [Number: 18] "There is a number, which is 18" [Number: @18] "There are 18 numbers (and we haven't specified what they are)" The To drive home the point, let us show this example: [Number: @18 18] "There are 18 numbers. Each of these numbers is the number 18." Prev: 9.9.2 DesignatorsUp: 9.9 Referents (optional)Next: 9.9.4 Locator |