KnowledgeWorks and Prolog User Guide > 7 Reference Guide

NextPrevUpTopContentsIndex

def-kb-struct

Macro
Summary

Defines a structure class for use in the object base.

Signature

def-kb-struct name-and-options { slot-description }* => name

Arguments

The arguments are as for defstruct , except that in name-and-options the only valid options are :include and :print-function .

Values

name

The name of the structure class.

Description

Defines a KnowledgeWorks structure class. Objects of these classes are analogous to Lisp structures except that they may be used in rules similarly to CLOS objects.

Examples
(def-kb-struct start)
(def-kb-struct (named-kb-struct
  (:print-function print-named-kb-struct))
  (name (gensym 'named-kb-struct)))
(def-kb-struct (possible-trucks-for-load
  (:include named-kb-struct))
  load trucks)
See also

def-kb-class


KnowledgeWorks and Prolog User Guide (Unix version) - 22 Dec 2009

NextPrevUpTopContentsIndex