Next: Matching
Up: prolog
Previous: Create Rules
Atoms
- String of letters and digits
- Start with lower case letter
- yes, parent, female, tom, tom_jones
- String of characters enclosed in single quotes ('Tom Jones')
Numbers [-][0-9]*[.][0-9]*
- 2.71, -100.5, 0.5 (but not .5)
Variables
- String of letters and digits
- Start with upper case letter (or _, anonymous variable)
- Universally quantified
Structures
- functor(arg1, arg2,
)
- date(2, october, 1964)
- Arguments can be constants, variables, or other structures
- Defined by Name and Arity (date/3 different from date/2)