6.1 Atoms, Strings, and Numbers
Prolog+CG has three kinds of constants. A constant is a value which does not change.
An atom is simply an identifier. For example, the following are all atoms:
A string is a sequence of characters which is "enclosed in double quotes". For example:
When writing CGs, strings can be used as referents of concepts.
// Type hiearchy Entity > Outcry. // Graph fact gr([Outcry : "Ouch!"]).
A number in Prolog+CG is either an integer or a real (decimal point) number.
When writing CGs, numbers can be used as concept descriptors of concepts.
// Type hierarchy Entity > Number. // Catalog of instances Number = Pi. // Graph fact gr([Number : Pi = 3.141592]).
This example is available in the AAU directory as pi.plgCG.
PrevLite: 6 Prolog for CG users
NextLite: 6.2 Structures, relationships and terms
Prev: 6 Prolog for CG users
Up: 6 Prolog for CG users
Next: 6.2 Structures, relationships and terms