Applying Logical Knowledge
Terms
- Atom - (internally coded as integers) starts with lower case letter,
alphanumeric chars & embedded underbars OK, no spaces, otherwise in single
quotes, special case []
anatom an_atom florida
'an atom' 'Florida' '37' []
- Decimal Number - an integer or float
14 23.7 -14 16.7e-5
- Other Numbers - preceded by 0x for hex, 0' for character code, others
available
0xff 0'r 0'y
- Logical Variable - starts with upper case or _
AVariable X _xyz
- Structure - a functor (atom syntax) with 1 or more comma separated
arguments, each of which can be any term. functor(arg1, arg2, arg3, ...)
age(sam, 47) address(city('Asheville'),
state('NC')))
- Operator - syntactic sugar structure of 1 or 2 arguments, represented
with functor between, before or after the arguments. Functor can be made of
all special characters (*+?^><=-/...) (so can atoms)
7 + 3 this ->> that X
= Y 'Mary' lives_in 'Asheville'
- List - comma separated terms in square brackets, or pure characters
in double quotes
[a,b,c] [sam, 14, state('NC'), X, [1,2,3]] "abc" [0'a,
0'b, 0'c]
- Strings - (internally coded as strings) not ISO, in Amzi! delimited
by backquotes `
`This is a string of text`
SEE DOCUMENTATION FOR DETAILS!