All Manuals > KnowledgeWorks and Prolog User Guide > 7 Reference Guide

make-instance Generic Function

Summary

Makes a CLOS or KnowledgeWorks structure object.

Package

common-lisp

Signature

make-instance class &rest initargs => object

Arguments
class
A class object or a symbol.
initargs
Initialization arguments for the object.
Values
object
A new instance of class.
Description

The generic function make-instance makes a new instance of the class class.

If class is a CLOS class then the behavior is as specified by make-instance in the Common Lisp standard.

If class is a KnowledgeWorks structure class, then initargs are the same as those for the automatically defined constructor function of the structure.

The object is added to the object base of the current inferencing state.

Examples
(make-instance 'start)
(make-instance 'driver :location 'London 
                      :kb-name 'fred)
See also

def-kb-class
def-kb-struct
def-named-kb-class


KnowledgeWorks and Prolog User Guide (Windows version) - 01 Dec 2021 19:36:03