topheader Welcome 34.230.68.214 @ xps.scios.ch on Thu Mar 28 15:00:03 UTC 2024
topheader
 
DEFTEMPLATE

DEFTEMPLATE

Ordered facts encode information positionally. To access that information,

a user must know not only what data is stored in a fact but which field

contains the data. Non-ordered (or deftemplate) facts provide the user

with the ability to abstract the structure of a fact by assigning names

to each field found within the fact. The deftemplate construct is

used to create a template which can then be used by non-ordered facts to

access fields of the fact by name. The deftemplate construct is analogous

to a record or structure definition in programming languages such as Pascal

and C.

The syntax of the deftemplate construct is:

(deftemplate <deftemplate-name> [<comment>]
   <slot-definition>*)

<slot-definition>         ::= <single-slot-definition> | 
                              <multislot-definition>

<single-slot-definition>  ::= (slot <slot-name> 
                                    <template-attribute>*)

<multislot-definition>    ::= (multislot <slot-name> 
                                         <template-attribute>*)

<template-attribute>      ::= <default-attribute> |
                              <constraint-attribute>

<default-attribute>  
                   ::= (default ?DERIVE | ?NONE | <expression>*) |
                       (default-dynamic <expression>*)
 
 
clips/clip7fmt.txt · Last modified: 2010/01/04 19:47 (external edit)
topheader
© 1998-2021, SciOS Scientific Operating Systems GmbH

Legal | Credits | Profile | Contact | Customer Login