4 HELP_USAGE FUNCTION_SUMMARY
5 RELEASE_NOTES COMMAND_SUMMARY
6 CONSTRUCT_SUMMARY INTEGRATED_EDITOR
10 1IBEGIN-ENTRY-HELP_USAGE
14 H.2 Using the Help Facility
15 The help facility displays menus of topics and prompts the user for a choice.
16 It then references the help file for that information. The help facility can
17 be called with or without a command-line topic.
22 where <path> is the full path leading to a topic in the help tree. For
23 example, for information on defrule syntax, the user would type:
24 (help construct_summary defrule).
25 The help function has no return value.
27 Each element or field in the path is delimited by white space, and the help
28 facility is not case sensitive. In addition, the entire name of a field does
29 not need to be specified. Only enough characters to distinguish the field
30 from other choices in the menu are necessary (if there is a conflict, the help
31 facility will pick the first one in the list). For instance, (help con def)
32 would be sufficient for the above example.
34 A few special fields can be used while in the help facility.
36 ^ Branch up one level.
37 ? When specified at the end of a path, this forces a display of the
38 current menu, even on branch-ups.
39 <nil> Giving no topic field will branch up one level.
41 A branch-up from the MAIN topic root node implies an exit from help.
43 By default, the help facility comes up in the MAIN topic root menu and the
44 user may make a choice as described above. The prompt line always displays
45 the name of the current menu. The help facility will branch through the help-
46 tree until instructed to exit by a branch-up from the top level. The level
47 always is reset to the MAIN topic upon exit from the help facility.
49 The first call to the help facility will take longer than successive calls
50 while the system loads help information into an internal lookup table. All
51 other calls to the help facility are very fast.
53 The help facility reads help information from a file during execution. Users
54 may wish to change the location of the help file to meet the configuration of
55 their system. The help-path function was provided to allow this.
58 (help-path [<help-file-name>])
60 If no argument is specified, the function displays the name of the current
61 help file. If an argument is specified, the help facility will use the new
62 file name for future help references during this CLIPS session. To change the
63 location of the help file permanently, a change must be made in the setup.h
64 file, then CLIPS must be recompiled. The help-path function has no return
69 1MBEGIN-ENTRY-RELEASE_NOTES
73 The release notes help section contains information about new features
74 and where to get technical support.
77 NEW_FEATURES SUPPORT_INFORMATION
81 2IBEGIN-ENTRY-NEW_FEATURES
86 Version 6.2 of CLIPS contains two major enhancements. First, CLIPS now
87 provides a mechanism which allows an embedded application to create
88 multiple environments into which programs can be loaded. Second, an
89 improved Windows 95/98/NT CLIPS interface is now available and the
90 Macintosh CLIPS interface has been enhanced to support MacOS X. For a
91 detailed listing of differences between the 6.x releases of CLIPS,
92 refer to appendix B of the Basic Programming Guide and appendix C of
93 the Advanced Programming Guide.
97 2IBEGIN-ENTRY-SUPPORT_INFORMATION
102 CLIPS executables, documentation, and source code are available for
103 download from http://www.ghg.net/clips/download/.
105 Questions regarding CLIPS can be sent via electronic mail to
108 An electronic conferencing facility, sponsored by Distributed Computing
109 Systems (http://www.discomsys.com), is also available to CLIPS users.
110 Subscribers to this facility may send questions, observations, answers,
111 editorials, etc., in the form of electronic mail to the conference. All
112 subscribers will have a copy of these messages reflected back to them at
113 their respective electronic mail addresses. To subscribe, send a single
114 line message to clips-request@discomsys.com containing the word
115 "subscribe". The subject field is ignored but the address found in the
116 ÔReply:Õ, ÔReply to:Õ, or ÔFrom:Õ field will be entered in the
117 distribution list. Upon subscription you will receive a mail message
118 instructing you how to participate in the conference from that point
119 forward. Save this mail message. You may need the instructions later if
120 you wish to unsubscribe from the list server.
122 To send your own messages to members of the conference you need simply
123 address your mail to clips@discomsys.com. Your message will be reflected
124 to all other members of the conference.
126 If you wish to remove yourself from the conference and discontinue
127 receiving mail simply send a message to clips-request@discomsys.com with
128 "unsubscribe" as the message text. If you want to unsubscribe using
129 another email account than the one you subscribed with, then append the
130 original subscribing email account to the text of the message. For
131 example: "unsubscribe john.doe@account.net". Do not send unsubscribe
132 messages to clips@discomsys.com! This sends a mail message to every
133 member of the list. If you need to get in contact with the list
134 administrator (for trouble unsubscribing or other questions about the
135 list), send email to clips-owner @discomsys.com.
137 Intelligent Software Professionals has made available the CLIPS-LIST
138 archive, a WWW-based full text searchable archive containing over two
139 years of question and answers directed to the CLIPS List Server. It can
140 be accessed at the URL http://www.isphouston.com/swish-web.html.
142 A CLIPS World Wide Web page can be accessed using the URL
143 http://www.ghg.net/clips/CLIPS.html.
145 Usenet users can also find information and post questions about CLIPS to the
146 comp.ai.shells news group.
148 The CLIPS Developers' Forum, a thread-based message board, is available
149 at http://www.cpbinc.com/clips. This board exists to provide a site for
150 discussion of research, development, and implementation of the CLIPS
151 expert systems and related technologies. The hosting services for this
152 web page are provided by CPB, Inc. Questions pertaining to this forum
153 can be sent to jerry.gamble@cpbinc.com.
157 1MBEGIN-ENTRY-CONSTRUCT_SUMMARY
161 This section gives a general overview of the available CLIPS constructs.
165 DEFFACTS DEFINSTANCES
166 DEFTEMPLATE DEFMESSAGE-HANDLER
168 DEFFUNCTION CONSTRAINT_ATTRIBUTES
173 2IBEGIN-ENTRY-DEFRULE
178 One of the primary methods of representing knowledge in CLIPS is a rule.
179 A rule is a collection of conditions and the actions to be taken if the
180 conditions are met. The developer of an expert system defines the rules
181 which describe how to solve a problem. Rules execute (or fire) based on
182 the existence or non-existence of facts. CLIPS provides the mechanism
183 (the inference engine) which attempts to match the rules to the current
184 state of the system (as represented by the fact-list) and applies the
187 (defrule <rule-name> [<comment>]
189 <conditional-element>*
194 ------------------------------------------------------------------
195 <declaration> ::= (declare <rule-property>+)
197 <rule-property> ::= (salience <integer-expression>) |
198 (auto-focus <boolean-symbol>)
201 ------------------------------------------------------------------
202 <conditional-element> ::= <pattern-CE> | <assigned-pattern-CE> |
203 <not-CE> | <and-CE> | <or-CE> |
204 <logical-CE> | <test-CE> |
205 <exists-CE> | <forall-CE>
207 <test-CE> ::= (test <function-call>)
209 <not-CE> ::= (not <conditional-element>)
211 <and-CE> ::= (and <conditional-element>+)
213 <or-CE> ::= (or <conditional-element>+)
215 <exists-CE> ::= (exists <conditional-element>+)
217 <forall-CE> ::= (forall <conditional-element>
218 <conditional-element>+)
220 <logical-CE> ::= (logical <conditional-element>+)
222 PATTERN CONDITIONAL ELEMENT
223 ------------------------------------------------------------------
224 <assigned-pattern-CE> ::= ?<variable-symbol> <- <pattern-CE>
226 <pattern-CE> ::= <ordered-pattern-CE> |
227 <template-pattern-CE> |
230 <ordered-pattern-CE> ::= (<symbol> <constraint>*)
232 <template-pattern-CE> ::= (<deftemplate-name <LHS-slot>*)
234 <object-pattern-CE> ::= (object <attribute-constraint>*)
236 <attribute-constraint> ::= (is-a <constraint>) |
237 (name <constraint>) |
238 (<slot-name> <constraint>*)
240 <LHS-slot> ::= <single-field-LHS-slot> |
241 <multifield-LHS-slot>
243 <LHS-slot> ::= <single-field-LHS-slot> |
244 <multifield-LHS-slot>
246 <single-field-LHS-slot> ::= (<slot-name> <constraint>)
248 <multifield-LHS-slot> ::= (<slot-name> <constraint>*)
251 ------------------------------------------------------------------
252 <constraint> ::= ? | $? | <connected-constraint>
254 <connected-constraint>
255 ::= <single-constraint> |
256 <single-constraint> & <connected-constraint> |
257 <single-constraint> | <connected-constraint>
259 <single-constraint> ::= <term> | ~<term>
261 <term> ::= <constant> |
262 <single-field-variable> |
263 <multifield-variable> |
269 2IBEGIN-ENTRY-DEFFACTS
274 With the deffacts construct, a list of facts can be defined which are
275 automatically asserted whenever the reset command is performed.
276 Facts asserted through deffacts may be retracted or pattern matched like
277 any other fact. The initial fact-list, including any defined deffacts,
278 is always reconstructed after a reset command.
280 The syntax of the deffacts construct is:
282 (deffacts <deffacts-name> [<comment>]
287 2IBEGIN-ENTRY-DEFTEMPLATE
292 Ordered facts encode information positionally. To access that information,
293 a user must know not only what data is stored in a fact but which field
294 contains the data. Non-ordered (or deftemplate) facts provide the user
295 with the ability to abstract the structure of a fact by assigning names
296 to each field found within the fact. The deftemplate construct is
297 used to create a template which can then be used by non-ordered facts to
298 access fields of the fact by name. The deftemplate construct is analogous
299 to a record or structure definition in programming languages such as Pascal
302 The syntax of the deftemplate construct is:
304 (deftemplate <deftemplate-name> [<comment>]
307 <slot-definition> ::= <single-slot-definition> |
308 <multislot-definition>
310 <single-slot-definition> ::= (slot <slot-name>
311 <template-attribute>*)
313 <multislot-definition> ::= (multislot <slot-name>
314 <template-attribute>*)
316 <template-attribute> ::= <default-attribute> |
317 <constraint-attribute>
320 ::= (default ?DERIVE | ?NONE | <expression>*) |
321 (default-dynamic <expression>*)
325 2IBEGIN-ENTRY-DEFGLOBAL
330 With the defglobal construct, global variables can be defined, set, and
331 accessed within the CLIPS environment. Global variables can be accessed
332 as part of the pattern matching process, but changing them does not invoke
333 the pattern matching process. The bind function is used to set the value
336 The syntax of the defglobal construct is:
338 <defglobal-construct> ::= (defglobal [<defmodule-name>]
339 <global-assignment>*)
341 <global-assignment> ::= <global-variable> = <expression>
343 <global-variable> ::= ?*<symbol>*
348 2IBEGIN-ENTRY-DEFFUNCTION
353 With the deffunction construct, new functions may be defined directly in
354 CLIPS. Deffunctions are equivalent in use to other functions in CLIPS.
355 The only differences between user-defined external functions and
356 deffunctions are that deffunctions are written in CLIPS and executed
357 by CLIPS interpretively and user-defined external functions are written
358 in an external language, such as C, and executed by CLIPS directly.
359 Also, deffunctions allow the addition of new functions without having to
360 recompile and relink CLIPS.
362 The syntax of the deffunction construct is:
364 (deffunction <name> [<comment>]
365 (<regular-parameter>* [<wildcard-parameter>])
368 <regular-parameter> ::= <single-field-variable>
369 <wildcard-parameter> ::= <multifield-variable>
373 2IBEGIN-ENTRY-DEFGENERIC/DEFMETHOD
378 With the defgeneric/defmethod constructs, new generic functions may be written
379 directly in CLIPS. Generic functions are similar to deffunctions because
380 they can be used to define new procedural code directly in CLIPS, and they can
381 be called like any other function. However, generic functions are much more
382 powerful because they can do different things depending on the types
383 (or classes) and number of their arguments. For example, a '+' operator could
384 be defined which performs concatenation for strings but still performs
385 arithmetic addition for numbers. Generic functions are comprised of
386 multiple components called methods, where each method handles different
387 cases of arguments for the generic function. A generic function which has
388 more than one method is said to be overloaded.
390 A generic function is comprised of a header (similar to a forward declaration)
391 and zero or more methods. A generic function header can either be explicitly
392 declared by the user or implicitly declared by the definition of at least one
393 method. The defgeneric construct is used to specify the generic function
395 and the defmethod construct is used for each of the generic function's
398 The syntax of the defgeneric/defmethod constructs is:
400 (defgeneric <name> [<comment>])
402 (defmethod <name> [<index>] [<comment>]
403 (<parameter-restriction>* [<wildcard-parameter>])
406 <parameter-restriction> ::= <single-field-variable> |
407 (<single-field-variable> <type>* [<query>])
409 <wildcard-parameter> ::= <multifield-variable>
411 <type> ::= <class-name>
413 <query> ::= <global-variable> | <function-call>
417 2IBEGIN-ENTRY-DEFCLASS
422 A defclass is a construct for specifying the properties (slots) of a class of
423 objects. A defclass consists of four elements: 1) a name, 2) a list of
424 superclasses from which the new class inherits slots and message-handlers,
425 3) a specifier saying whether or not the creation of direct instances of the
426 new class is allowed and 4) a list of slots specific to the new class. All
427 user-defined classes must inherit from at least one class, and to this end
428 COOL provides predefined system classes for use as a base in the derivation
431 Any slots explicitly given in the defclass override those gotten from
432 inheritance. COOL applies rules to the list of superclasses to generate a
433 class precedence list for the new class. Facets further describe slots.
434 Some examples of facets include: default value, cardinality, and types of
437 The syntax of the defclass construct is:
439 (defclass <name> [<comment>]
440 (is-a <superclass-name>+)
442 [<pattern-match-role>]
444 <handler-documentation>*)
446 <role> ::= (role concrete | abstract)
449 ::= (pattern-match reactive | non-reactive)
451 <slot> ::= (slot <name> <facet>*) |
452 (single-slot <name> <facet>*) |
453 (multislot <name> <facet>*)
455 <facet> ::= <default-facet> | <storage-facet> |
456 <access-facet> | <propagation-facet> |
457 <source-facet> | <pattern-match-facet> |
458 <visibility-facet> | <create-accessor-facet>
459 <override-message-facet> | <constraint-attributes>
462 (default ?DERIVE | ?NONE | <expression>*) |
463 (default-dynamic <expression>*)
465 <storage-facet> ::= (storage local | shared)
468 ::= (access read-write | read-only | initialize-only)
470 <propagation-facet> ::= (propagation inherit | no-inherit)
472 <source-facet> ::= (source exclusive | composite)
474 <pattern-match-facet>
475 ::= (pattern-match reactive | non-reactive)
477 <visibility-facet> ::= (visibility private | public)
479 <create-accessor-facet>
480 ::= (create-accessor ?NONE | read | write | read-write)
482 <override-message-facet>
483 ::= (override-message ?DEFAULT | <message-name>)
485 <handler-documentation>
486 ::= (message-handler <name> [<handler-type>])
488 <handler-type> ::= primary | around | before | after
492 2IBEGIN-ENTRY-DEFINSTANCES
497 Similar to deffacts, the definstances construct allows the specification of
498 instances which will be created every time the reset command is executed.
499 On every reset all current instances receive a delete message, and the
500 equivalent of a make-instance function call is made for every instance
501 specified in definstances constructs.
503 The syntax of the definstances construct is:
505 <definstances-construct>
506 ::= (definstances <definstances-name> [<comment>]
507 <instance-template>*)
509 <instance-template> ::= (<instance-definition>)
511 <instance-definition> ::= <instance-name-expression> of
512 <class-name-expression>
515 <slot-override> ::= (<slot-name-expression> <expression>*)
519 2IBEGIN-ENTRY-DEFMESSAGE-HANDLER
524 Objects are manipulated by sending them messages via the function send. The
525 result of a message is a useful return-value or side-effect. A
526 defmessage-handler is a construct for specifying the behavior of a class of
527 objects in response to a particular message. The implementation of a message
528 is made up of pieces of procedural code called message-handlers (or handlers
529 for short). Each class in the class precedence list of an object's class can
530 have handlers for a message. In this way, the object's class and all its
531 superclasses share the labor of handling the message. Each class's handlers
532 handle the part of the message which is appropriate to that class. Within a
533 class, the handlers for a particular message can be further subdivided into
534 four types or categories: primary, before, after and around.
536 A defmessage-handler is comprised of seven elements: 1) a class name to which
537 to attach the handler (the class must have been previously defined), 2) a
538 message name to which the handler will respond, 3) an optional type (the
539 default is primary), 4) an optional comment, 5) a list of parameters that will
540 be passed to the handler during execution, 6) an optional wildcard parameter
541 and 7) a series of expressions which are executed in order when the handler
542 is called. The return-value of a message-handler is the evaluation of the
544 expression in the body.
546 The syntax of the defmessage-handler construct is:
548 (defmessage-handler <class-name> <message-name>
549 [<handler-type>] [<comment>]
550 (<parameter>* [<wildcard-parameter>])
553 <handler-type> ::= around | before | primary | after
555 <parameter> ::= <single-field-variable>
557 <wildcard-parameter> ::= <multifield-variable>
561 2IBEGIN-ENTRY-DEFMODULE
566 CLIPS provides support for the modular development and execution of knowledge
567 bases with the defmodule construct. CLIPS modules allow a set of constructs to
568 be grouped together such that explicit control can be maintained over
569 restricting the access of the constructs by other modules. This type of
570 control is similar to global and local scoping used in languages such as C or
571 Ada. By restricting access to deftemplate and defclass constructs, modules can
572 function as blackboards, permitting only certain facts and instances to be
573 seen by other modules. Modules are also used by rules to provide execution
576 The syntax of the defmodule construct is:
578 <defmodule-construct> ::= (defmodule <module-name> [<comment>]
581 <port-specification> ::= (export <port-item>) |
582 (import <module-name> <port-item>)
584 <port-item> ::= ?ALL |
586 <port-construct> ?ALL |
587 <port-construct> ?NONE |
588 <port-construct> <construct-name>+
590 <port-construct> ::= deftemplate | defclass |
591 defglobal | deffunction | defgeneric
595 2IBEGIN-ENTRY-CONSTRAINT_ATTRIBUTES
598 CONSTRAINT_ATTRIBUTES
600 Constraint attributes can be associated with deftemplate and defclass slots so
601 that type checking can be performed on slot values when template facts and
602 instances are created. The constraint information is also analyzed for the
603 patterns on the LHS of a rule to determine if the specified constraints
604 prevent the rule from ever firing.
606 The syntax for constraint attributes is:
608 <constraint-attribute> ::= <type-attribute>Ê|
609 <allowed-constant-attribute> |
611 <cardinality-attribute>
614 <type-attribute> ::= (type <type-specification>)
616 <type-specification> ::= <allowed-type>+ | ?VARIABLE
618 <allowed-type> ::= SYMBOL | STRING | LEXEME |
619 INTEGER | FLOAT | NUMBER |
620 INSTANCE-NAME | INSTANCE-ADDRESS |
622 EXTERNAL-ADDRESS | FACT-ADDRESS
624 <allowed-constant-attribute>
625 ::= (allowed-symbolsÊ<symbol-list>) |
626 (allowed-strings <string-list>) |
627 (allowed-lexemes <lexeme-list> |
628 (allowed-integersÊ<integer-list>) |
629 (allowed-floatsÊ<float-list>) |
630 (allowed-numbersÊ<number-list>) |
631 (allowed-instance-names <instance-list>) |
632 (allowed-valuesÊ<value-list>) |
634 <symbol-list> ::= <symbol>+ | ?VARIABLE
636 <string-list> ::= <string>+ | ?VARIABLE
638 <lexeme-list> ::= <lexeme>+ | ?VARIABLE
640 <integer-list> ::= <integer>+ | ?VARIABLE
642 <float-list> ::= <float>+ | ?VARIABLE
644 <number-list> ::= <number>+ | ?VARIABLE
646 <instance-name-list> ::= <instance-name>+ | ?VARIABLE
648 <value-list> ::= <constant>+ | ?VARIABLE
650 <range-attribute> ::= (range <range-specification>
651 <range-specification>)
653 <range-specification> ::= <number> | ?VARIABLE
655 <cardinality-attribute>
656 ::= (cardinality <cardinality-specification>
657 <cardinality-specification>)
659 <cardinality-specification> ::= <integer> | ?VARIABLE
663 1MBEGIN-ENTRY-FUNCTION_SUMMARY
667 This section gives a general overview of the available CLIPS functions.
670 PREDICATE_FUNCTIONS DEFRULE_FUNCTIONS
671 MULTIFIELD_FUNCTIONS AGENDA_FUNCTIONS
672 STRING_FUNCTIONS DEFGLOBAL_FUNCTIONS
673 IO_FUNCTIONS DEFFUNCTION_FUNCTIONS
674 MATH_FUNCTIONS GENERIC_FUNCTION_FUNCTIONS
675 PROCEDURAL_FUNCTIONS COOL_FUNCTIONS
676 MISCELLANEOUS_FUNCTIONS DEFMODULE_FUNCTIONS
677 DEFTEMPLATE_FUNCTIONS SEQUENCE_EXPANSION_FUNCTIONS
682 2IBEGIN-ENTRY-PREDICATE_FUNCTIONS
687 The following functions perform predicate tests and return
688 either TRUE or FALSE.
690 NUMBERP: Returns TRUE for integers and floats.
691 (numberp <expression>)
693 FLOATP: Returns TRUE for floats.
694 (floatp <expression>)
696 INTEGERP: Returns TRUE for integers.
697 (integerp <expression>)
699 LEXEMEP: Returns TRUE for symbols and strings.
700 (numberp <expression>)
702 STRINGP: Returns TRUE for strings.
703 (stringp <expression>)
705 SYMBOLP: Returns TRUE for symbols.
706 (symbolp <expression>)
708 EVENP: Returns TRUE for even numbers.
711 ODDP: Returns TRUE for odd numbers.
714 MULTIFIELDP: Returns TRUE for multifield values.
715 (multifieldp <expression>)
717 POINTERP: Returns TRUE for external addresses.
718 (pointerp <expression>)
720 EQ: Returns TRUE if the 1st argument is equal in type and value
721 to all subsequent arguments.
722 (eq <expression> <expression>+)
724 NEQ: Returns TRUE if the 1st argument is not equal in type and
725 value to all subsequent arguments.
726 (neq <expression> <expression>+)
728 =: Returns TRUE if the 1st argument is equal in value
729 to all subsequent arguments.
730 (= <numeric-expression> <numeric-expression>+)
732 <>: Returns TRUE if the 1st argument is not equal in value
733 to all subsequent arguments.
734 (<> <numeric-expression> <numeric-expression>+)
736 >: Returns TRUE if each argument is greater in value than the
737 argument following it.
738 (> <numeric-expression> <numeric-expression>+)
740 >=: Returns TRUE if each argument is greater than or equal to
741 in value than the argument following it.
742 (>= <numeric-expression> <numeric-expression>+)
744 <: Returns TRUE if each argument is less in value than the
745 argument following it.
746 (> <numeric-expression> <numeric-expression>+)
748 <=: Returns TRUE if each argument is less than or equal to
749 in value than the argument following it.
750 (<= <numeric-expression> <numeric-expression>+)
752 AND: Returns TRUE if all arguments evaluate to a non-FALSE value.
755 OR: Returns TRUE if any argument evaluates to a non-FALSE value.
758 NOT: Returns TRUE if its only argument evaluates to FALSE.
763 2IBEGIN-ENTRY-MULTIFIELD_FUNCTIONS
768 The following functions operate on multifield values.
770 CREATE$: Appends its arguments together to create a multifield value.
771 (create$ <expression>*)
773 NTH$: Returns the specified field of a multifield value.
774 (nth$ <integer-expression> <multifield-expression>)
776 MEMBER$: Returns the position of a single-field value within a multifield
778 (member$ <single-field-expression> <multifield-expression>)
780 SUBSETP: Returns TRUE if the first argument is a subset of the second
782 (subsetp <multifield-expression> <multifield-expression>)
784 DELETE$: Deletes the specified range from a multifield value.
785 (delete$ <multifield-expression>
786 <begin-integer-expression> <end-integer-expression>)
788 EXPLODE$: Creates a multifield value from a string.
789 (explode$ <string-expression>)
791 IMPLODE$: Creates a string from a multifield value.
792 (implode$ <multifield-expression>)
794 SUBSEQ$: Extracts the specified range from a multifield value.
795 (subseq$ <multifield-expression>
796 <begin-integer-expression> <end-integer-expression>)
798 REPLACE$: Replaces the specified range of a multifield value with a
800 (replace$ <multifield-expression>
801 <begin-integer-expression> <end-integer-expression>
802 <single-or-multifield-expression>+)
804 INSERT$: Inserts one or more values in a multifield.
805 (insert$ <multifield-expression> <integer-expression>
806 <single-or-multifield-expression>+)
808 FIRST$: Returns the first field of a multifield.
809 (first$ <multifield-expression>)
811 REST$: Returns all but the first field of a multifield.
812 (rest$ <multifield-expression>)
814 LENGTH$: Returns the number of fields in a multifield value.
815 (length$ <multifield-expression>)
817 DELETE-MEMBER$: Deletes specific values contained within a multifield
818 value and returns the modified multifield value.
819 (delete-member$ <multifield-expression> <expression>+)
821 REPLACE-MEMBER$: Replaces specific values contained within a multifield
822 value and returns the modified multifield value.
823 (replace-member$ <multifield-expression> <substitute-expression>
824 <search-expression>+)
828 2IBEGIN-ENTRY-STRING_FUNCTIONS
833 The following functions perform operations that are related to strings.
835 STR-CAT: Concatenates its arguments to form a single string.
836 (str-cat <expression>*)
838 SYM-CAT: Concatenates its arguments to form a single symbol.
839 (sym-cat <expression>*)
841 SUB-STRING: Retrieves a subportion from a string.
842 (sub-string <integer-expression> <integer-expression> <string-expression>)
844 STR-INDEX: Returns the position of the first argument within the second
846 (str-index <lexeme-expression> <lexeme-expression>)
848 EVAL: Evaluates a string as though it were entered at the command prompt.
849 Only allows functions to be evaluated.
850 (eval <lexeme-expression>)
852 BUILD: Evaluates a string as though it were entered at the command prompt.
853 Only allows constructs to be evaluated.
854 (build <lexeme-expression>)
856 UPCASE: Converts lowercase characters in a string or symbol to uppercase.
857 (upcase <lexeme-expression>)
859 LOWCASE: Converts uppercase characters in a string or symbol to lowercase.
860 (lowcase <lexeme-expression>)
862 STR-COMPARE: Lexigraphically compares two strings.
863 (str-compare <lexeme-expression> <lexeme-expression>)
865 STR-LENGTH: Returns the length of a string.
866 (str-length <lexeme-expression>)
868 CHECK-SYNTAX: Allows the text representation of a construct or function
869 call to be checked for syntax and semantic errors.
870 (check-syntax <construct-or-function-string>)
872 STRING-TO-FIELD: Parses a string and converts its contents to a primitive
874 (string-to-field <string-or-symbol-expression>)
878 2IBEGIN-ENTRY-IO_FUNCTIONS
883 The following functions perform I/O operations.
886 (open <file-name> <logical-name> [<mode>])
887 <mode> ::= "r" | "w" | "r+" | "a" | "wb"
889 CLOSE: Closes a file.
890 (close [<logical-name>])
892 PRINTOUT: Sends unformated output to the specified logical name.
893 (printout <logical-name> <expresion>*)
895 READ: Reads a single-field value from the specified logical name.
896 (read [<logical-name>])
898 READLINE: Reads an entire line as a string from the specified
900 (readline [<logical-name>])
902 FORMAT: Sends formated output to the specified logical name.
903 (format <logical-name> <string-expression> <expression>*)
905 RENAME: Changes the name of a file.
906 (rename <old-file-name> <new-file-name>)
908 REMOVE: Deletes a file.
913 2MBEGIN-ENTRY-MATH_FUNCTIONS
918 The math functions have been divided into three broad categories. The
919 basic math functions are always provided with CLIPS. The trigonometric
920 and extended math functions are included as part of the extended math
924 BASIC_MATH_FUNCTIONS EXTENDED_MATH_FUNCTIONS
925 TRIGONOMETRIC_FUNCTIONS
929 3IBEGIN-ENTRY-BASIC_MATH_FUNCTIONS
935 The following functions perform basic mathematical operations.
937 +: Returns the sum of its arguments.
938 (+ <numeric-expression> <numeric-expression>+)
940 -: Returns the first argument minus all subsequent arguments.
941 (- <numeric-expression> <numeric-expression>+)
943 *: Returns the product of its arguments.
944 (* <numeric-expression> <numeric-expression>+)
946 /: Returns the first argument divided by all subsequent arguments.
947 (/ <numeric-expression> <numeric-expression>+)
949 DIV: Returns the first argument divided by all subsequent arguments
950 using integer division.
951 (div <numeric-expression> <numeric-expression>+)
953 MAX: Returns the value of its largest numeric argument.
954 (max <numeric-expression>+)
956 MIN: Returns the value of its smallest numeric argument.
957 (min <numeric-expression>+)
959 ABS: Returns the absolute value of its only argument.
960 (abs <numeric-expression>)
962 FLOAT: Converts its only argument to a float.
963 (float <numeric-expression>)
965 INTEGER: Converts its only argument to an integer.
966 (integer <numeric-expression>)
970 3IBEGIN-ENTRY-TRIGONOMETRIC_FUNCTIONS
974 TRIGONOMETRIC_FUNCTIONS
976 The following trigonometric functions take one numeric argument
977 and return a float. The argument is expected to be in radians.
978 These functions are part of the extended math package.
981 ----------------------------------------
983 acosh hyperbolic arccosine
985 acoth hyperbolic arccotangent
987 acsch hyperbolic arccosecant
989 asech hyperbolic arcsecant
991 asinh hyperbolic arcsine
993 atanh hyperbolic arctangent
995 cosh hyperbolic cosine
997 coth hyperbolic tangent
999 csch hyperbolic cosecant
1001 sech hyperbolic secant
1003 sinh hyperbolic sine
1005 tanh hyperbolic tangent
1009 3IBEGIN-ENTRY-EXTENDED_MATH_FUNCTIONS
1013 EXTENDED_MATH_FUNCTIONS
1015 The following functions perform extended mathematical operations
1016 and are included as part of the extended math package.
1018 DEG-GRAD: Converts its only argument from degrees to gradients.
1019 (deg-grad <numeric-expression>)
1021 DEG-RAD: Converts its only argument from degrees to radians.
1022 (deg-rad <numeric-expression>)
1024 GRAD-DEG: Converts its only argument from gradients to degrees.
1025 (grad-deg <numeric-expression>)
1027 RAD-DEG: Converts its only argument from radians to degrees.
1028 (rad-deg <numeric-expression>)
1030 PI: Returns the value of pi.
1033 SQRT: Returns the square root of its only argument.
1034 (sqrt <numeric-expression>)
1036 **: Raises its first argument to the power of its second argument.
1037 (** <numeric-expression> <numeric-expression>)
1039 EXP: Raises the value e to the power of its only argument.
1040 (exp <numeric-expression>)
1042 LOG: Returns the logarithm base e of its only argument.
1043 (log <numeric-expression>)
1045 LOG10: Returns the logarithm base 10 of its only argument.
1046 (log10 <numeric-expression>)
1048 ROUND: Rounds its argument toward the closest integer or negative
1049 infinity if exactly between two integers.
1050 (round <numeric-expression>)
1052 MOD: Returns the remainder of the result of dividing its first argument
1053 by its second argument (assuming that the result of division must
1055 (mod <numeric-expression> <numeric-expression>)
1059 2IBEGIN-ENTRY-PROCEDURAL_FUNCTIONS
1062 PROCEDURAL_FUNCTIONS
1064 The following are functions which provide procedural programming
1065 capabilities as found in languages such as Pascal, C, and Ada.
1067 BIND: Binds a variable to a new value.
1068 (bind <variable> <expression>*)
1070 IF: Allows conditional execution of a group of actions.
1071 (if <expression> then <action>* [else <action>*])
1073 WHILE: Allows conditional looping.
1074 (while <expression> [do] <action>*)
1076 LOOP-FOR-COUNT: Allows simple iterative looping.
1077 (loop-for-count <range-spec> [do] <action>*)
1078 <range-spec> ::= <end-index> |
1079 (<loop-variable> [<start-index> <end-index>])
1080 <start-index> ::= <integer-expression>
1081 <end-index> ::= <integer-expression>
1083 PROGN: Evaluates all arguments and returns the value of the last
1085 (progn <expression>*)
1087 PROGN$: Performs a set of actions for each field of a multifield value.
1088 (progn$ <list-spec> <expression>*)
1089 <list-spec> ::= <multifield-expression> |
1090 (<list-variable> <multifield-expression>)
1092 RETURN: Immediately terminates the currently executing deffunction,
1093 generic function method, message-handler, defrule RHS, or
1094 certain instance set query functions and if a value is
1095 specified, returns this value as the result of the executing
1097 (return [<expression>])
1099 BREAK: Immediately terminates the currently iterating while loop,
1100 progn execution, or certain instance set query functions.
1103 SWITCH: Allows a particular group of actions to be performed based
1104 on a specified value.
1105 (switch <test-expression>
1107 [<default-statement>])
1108 <case-statement> ::= (case <comparison-expression> then <action>*)
1109 <default-statement> ::= (default <action>*)
1113 2IBEGIN-ENTRY-MISCELLANEOUS_FUNCTIONS
1116 MISCELLANEOUS_FUNCTIONS
1118 The following are additional functions for use within CLIPS.
1120 GENSYM: Returns a special sequenced symbol.
1123 GENSYM*: Returns a special unique sequenced symbol.
1126 SETGEN: Sets the starting number used by gensym and gensym*.
1127 (setgen <integer-expression>)
1129 RANDOM: Returns a "random" integer value.
1130 (random [<start-integer-expression> <end-integer-expression>])
1132 SEED: Seeds the random number generator used by random.
1133 (seed <integer-expression>)
1135 TIME: Returns a float representing the elapsed seconds since
1136 the system reference time.
1139 LENGTH: Returns an integer for the number of fields in a multifield value
1140 or the length in characters of a string or symbol.
1141 (length <lexeme-or-multifield-expression>)
1143 GET-FUNCTION_RESTRICTIONS: Returns the restriction string associated with
1144 a CLIPS or user defined function.
1145 (get-function-restrictions <function-name>)
1147 SORT: Allows a list of values to be sorted based on a user specified
1148 comparison function.
1149 (sort <comparison-function-name> <expression>*)
1151 FUNCALL: Constructs a function call from its arguments and then
1152 evaluates the function call.
1153 (funcall (function-name> <expression>*)
1155 TIMER: Returns the number of seconds elapsed evaluating a series of
1157 (timer <expression>*)
1161 2IBEGIN-ENTRY-DEFTEMPLATE_FUNCTIONS
1163 The following functions provide ancillary capabilities for the deftemplate
1166 GET-DEFTEMPLATE-LIST: Returns the list of all deftemplates in the specified
1167 module (or the current module if unspecified).
1168 (get-deftemplate-list [<module-name>])
1170 DEFTEMPLATE-MODULE: Returns the module in which the specified deftemplate is
1172 (deftemplate-module <deftemplate-name>)
1176 2IBEGIN-ENTRY-FACT_FUNCTIONS
1178 The following actions are used for assert, retracting, and modifying facts.
1180 ASSERT: Adds a fact to the fact-list.
1181 (assert <RHS-pattern>+)
1183 RETRACT: Removes a fact from the fact-list.
1184 (retract <retract-specifier>+ | *)
1185 <retract-specifier> ::= <fact-specifier> | <integer-expression>
1187 MODIFY: Modifies a deftemplate fact in the fact-list.
1188 (modify <fact-specifier> <RHS-slot>*)
1190 DUPLICATE: Duplicates a deftemplate fact in the fact-list.
1191 (duplicate <fact-specifier> <RHS-slot>*)
1193 ASSERT-STRING: Converts a string into a fact and asserts it.
1194 (assert-string <string-expression>)
1196 FACT-INDEX: Returns the fact index of a fact address.
1197 (fact-index <fact-address>)
1199 FACT-EXISTP: Returns TRUE if the fact specified by its fact-index or
1200 fact-address arguments exists, otherwise FALSE.
1201 (fact-existp <fact-address-or-index>)
1203 FACT-RELATION: Returns the deftemplate (relation) name associated with
1205 (fact-relation <fact-address-or-index>)
1207 FACT-SLOT-NAMES: Returns the slot names associated with the fact.
1208 (fact-slot-names <fact-address-or-index>)
1210 FACT-SLOT-VALUE: Returns the value of the specified slot from the
1212 (fact-slot-value <fact-address-or-index> <slot-name>)
1214 GET-FACT-LIST: Returns a multifield containing the list of visible facts.
1215 (get-fact-list [<module-name>])
1219 2IBEGIN-ENTRY-DEFFACTS_FUNCTIONS
1221 The following functions provide ancillary capabilities for the deffacts
1224 GET-DEFFACTS-LIST: Returns the list of all deffacts in the specified
1225 module (or the current module if unspecified).
1226 (get-deffacts-list [<module-name>])
1228 DEFFACTS-MODULE: Returns the module in which the specified deffacts is
1230 (deffacts-module <deffacts-name>)
1234 2IBEGIN-ENTRY-DEFRULE_FUNCTIONS
1236 The following functions provide ancillary capabilities for the defrule
1239 GET-DEFRULE-LIST: Returns the list of all defrules in the specified
1240 module (or the current module if unspecified).
1241 (get-defrule-list [<module-name>])
1243 DEFRULE-MODULE: Returns the module in which the specified defrule is
1245 (defrule-module <defrule-name>)
1249 2IBEGIN-ENTRY-AGENDA_FUNCTIONS
1251 The following functions provide ancillary capabilities for manipulating the
1254 GET-FOCUS: Returns the module name of the current focus.
1257 GET-FOCUS-STACK: Returns all of the module names in the focus stack as a
1261 POP-FOCUS: Removes the current focus from the focus stack and returns the
1262 module name of the current focus.
1267 2IBEGIN-ENTRY-DEFGLOBAL_FUNCTIONS
1269 The following functions provide ancillary capabilities for the defglobal
1272 GET-DEFGLOBAL-LIST: Returns the list of all defglobals in the specified
1273 module (or the current module if unspecified).
1274 (get-defglobal-list [<module-name>])
1276 DEFGLOBAL-MODULE: Returns the module in which the specified defglobal is
1278 (defglobal-module <defglobal-name>)
1282 2IBEGIN-ENTRY-DEFFUNCTION_FUNCTIONS
1284 The following functions provide ancillary capabilities for the deffunction
1287 GET-DEFFUNCTION-LIST: Returns the list of all deffunctions in the specified
1288 module (or the current module if unspecified).
1289 (get-deffunction-list [<module-name>])
1291 DEFFUNCTION-MODULE: Returns the module in which the specified deffunction
1293 (deffunction-module <deffunction-name>)
1297 2IBEGIN-ENTRY-GENERIC_FUNCTION_FUNCTIONS
1300 GENERIC_FUNCTION_FUNCTIONS
1302 The following functions provide ancillary capabilities for generic
1305 GET-DEFGENERIC-LIST: Returns the list of all defgenerics in the specified
1306 module (or the current module if unspecified).
1307 (get-defgeneric-list [<module-name>])
1309 DEFGENERIC-MODULE: Returns the module in which the specified defgeneric
1311 (defgeneric-module <defgeneric-name>)
1313 GET-DEFMETHOD-LIST: Returns the list of all defmethods in the current
1314 module (or just the methods associated with the
1315 specified defgeneric).
1316 (get-defmethod-list [<defgeneric-name>])
1318 TYPE: Returns a symbol which is the name of the type (or class)
1322 NEXT-METHODP: If called from a method for a generic function, the function
1323 next-methodp will return the symbol TRUE if there is another
1324 method shadowed by the current one. Otherwise, the function
1325 will return the symbol FALSE.
1328 CALL-NEXT-METHOD: Calls the next shadowed method.
1331 OVERRIDE-NEXT-METHOD: Calls the next shadowed method allowing new
1332 arguments to be provided.
1333 (override-next-method <expression>*)
1335 CALL-SPECIFIC-METHOD: Calls a particular method of a generic function without
1336 regards to method precedence.
1337 (call-specific-method <generic-function> <method-index> <expression>*)
1339 GET-METHOD-RESTRICTIONS: Returns a multifield value containing information
1340 about the restrictions for the specified method.
1341 (get-method-restrictions <generic-function-name> <method-index>)
1345 2MBEGIN-ENTRY-COOL_FUNCTIONS
1350 The functions manipulating the CLIPS Object-Oriented Language (COOL)
1351 are divided into five categories.
1354 CLASS_FUNCTIONS INSTANCE_SLOT_FUNCTIONS
1355 INSTANCE_MANIPULATION_FUNCTIONS MESSAGE-HANDLER_FUNCTIONS
1356 DEFINSTANCES_FUNCTIONS INSTANCE_PREDICATE_FUNCTIONS
1360 3IBEGIN-ENTRY-CLASS_FUNCTIONS
1366 The following functions are used with classes.
1368 GET-DEFCLASS-LIST: Returns the list of all defclasses in the specified
1369 module (or the current module if unspecified).
1370 (get-defclass-list [<module-name>])
1372 DEFCLASS-MODULE: Returns the module in which the specified defclass
1374 (defclass-module <defclass-name>)
1376 CLASS-EXISTP: Returns TRUE if the specified class is defined, FALSE otherwise.
1377 (class-existp <class-name>)
1379 SUPERCLASSP: Returns TRUE if the first class is a superclass of
1380 the second class, FALSE otherwise.
1381 (superclassp <class1-name> <class2-name>)
1383 SUBCLASSP: Returns TRUE if the first class is a subclass of
1384 the second class, FALSE otherwise.
1385 (subclassp <class1-name> <class2-name>)
1387 SLOT-EXISTP: Returns TRUE if the specified slot is present in the class,
1388 FALSE otherwise. If the inherit keyword is specified, then
1389 the slot may be inherited.
1390 (slot-existp <class-name> <slot-name> [inherit])
1392 SLOT-WRITABLEP: Returns TRUE if the specified slot is writable,
1394 (slot-writablep <class-name> <slot-name>)
1396 SLOT-INITABLEP: Returns TRUE if the specified slot is initializable,
1398 (slot-initablep <class-name> <slot-name>)
1400 SLOT-PUBLICP: Returns TRUE if the specified slot is public,
1402 (slot-initablep <class-name> <slot-name>)
1404 SLOT-DIRECT-ACCESSP: Returns TRUE if the specified slot can be accessed
1405 directly, otherwise FALSE.
1406 (slot-direct-accessp <class-name> <slot-name>)
1408 MESSAGE-HANDLER-EXISTP: Returns TRUE if the specified message-handler is
1409 defined (directly, not by inheritance) for the
1410 class, FALSE otherwise.
1411 (message-handler-existp <class-name> <handler-name> [<handler-type>])
1412 <handler-type> ::= around | before | primary | after
1414 CLASS-ABSTRACTP: Returns TRUE if the specified class is abstract,
1416 (class-abstractp <class-name>)
1418 CLASS-REACTIVEP: Returns TRUE if the specified class is reactive,
1420 (class-reactivep <class-name>)
1422 CLASS-SUPERCLASSES: Returns the names of the direct superclasses of a class in
1423 a multifield variable. If the optional "inherit" argument
1424 is given, indirect superclasses are also included.
1425 (class-superclasses <class-name> [inherit])
1427 CLASS-SUBCLASSES: Returns the names of the direct subclasses of a class in a
1428 multifield variable. If the optional "inherit" argument is
1429 given, indirect subclasses are also included.
1430 (class-subclasses <class-name> [inherit])
1432 CLASS-SLOTS: Returns the names of the explicitly defined slots of a class in
1433 a multifield variable. If the optional inherit keyword is
1434 given, inherited slots are also included.
1435 (class-slots <class-name> [inherit])
1437 GET-DEFMESSAGE-HANDLER-LIST: Returns the class names, message names, and
1438 message types of the message-handlers directly
1439 attached to a class in a multifield variable. If
1440 the optional inherit keyword is given, inherited
1441 message-handlers are also included.
1442 (get-defmessage-handler-list <class-name> [inherit])
1444 SLOT-FACETS: Returns the facet values for the specified slot of a class in a
1446 (slot-facets <class-name> <slot-name>)
1448 SLOT-SOURCES: Returns the names of the classes which provide facets for a
1449 slot of a class in a multifield variable.
1450 (slot-sources <class-name> <slot-name>)
1452 SLOT-TYPES: Returns the names of the primitive types allowed for a slot
1453 in a multifield variable.
1454 (slot-types <class-name> <slot-name>)
1456 SLOT-CARDINALITY: Returns the minimum and maximum number of fields allowed
1457 for a multislot in a multifield variable.
1458 (slot-cardinality <class-name> <slot-name>)
1460 SLOT-ALLOWED-VALUES: Returns the allowed values for a slot in a
1462 (slot-allowed-values <class-name> <slot-name>)
1464 SLOT-RANGE: Returns the minimum and maximum numeric values allowed
1466 (slot-range <class-name> <slot-name>)
1468 SLOT-DEFAULT-VALUE: Returns the default value associated with a slot.
1469 (slot-default-value <class-name> <slot-name>)
1471 SET-CLASS-DEFAULTS-MODE: Sets the defaults mode used when classes are
1473 (set-class-defaults-mode <mode>)
1474 <mode> ::= convenience | conservation
1476 GET-CLASS-DEFAULTS-MODE: Returns the current defaults mode used when
1477 classes are defined.
1478 (get-class-defaults-mode)
1482 3IBEGIN-ENTRY-MESSAGE-HANDLER_FUNCTIONS
1486 MESSAGE-HANDLER_FUNCTIONS
1488 The following functions are used with message-handlers.
1490 NEXT-HANDLERP: Returns TRUE if there is another message-handler available
1491 for execution, FALSE otherwise.
1494 CALL-NEXT-HANDLER: Calls the next shadowed handler.
1497 OVERRIDE-NEXT-HANDLER: Calls the next shadowed handler and allows the
1498 arguments to be changed.
1499 (override-next-handler <expression>*)
1503 3IBEGIN-ENTRY-DEFINSTANCES_FUNCTIONS
1507 DEFINSTANCES_FUNCTIONS
1509 The following functions are used with definstances.
1511 GET-DEFINSTANCES-LIST: Returns the list of all definstances in the specified
1512 module (or the current module if unspecified).
1513 (get-definstances-list [<module-name>])
1515 DEFINSTANCES-MODULE: Returns the module in which the specified definstance
1517 (definstances-module <definstances-name>)
1521 3IBEGIN-ENTRY-INSTANCE_MANIPULATION_FUNCTIONS
1525 INSTANCE_MANIPULATION_FUNCTIONS
1527 The following manipulation functions are used with instances.
1529 INIT-SLOTS: Implements the init message-handler attached to the class
1530 USER. This function should never be called directly unless
1531 an init message-handler is being defined such that the one
1532 attached to USER will never be called.
1535 UNMAKE-INSTANCE: Deletes the specified instance by sending it
1537 (unmake-instance <instance-expression> | *)
1539 DELETE-INSTANCE: Deletes the active instance when called from within
1540 the body of a message-handler.
1543 CLASS: Returns a symbol which is the name of the class of its argument.
1544 (class <object-expression>)
1546 INSTANCE-NAME: Returns a symbol which is the name of its instance argument.
1547 (instance-name <instance-expression>)
1549 INSTANCE-ADDRESS: Returns the address of its instance argument.
1550 (instance-address <instance-expression>)
1552 SYMBOL-TO-INSTANCE-NAME: Converts a symbol to an instance name.
1553 (symbol-to-instance-name <symbol-expression>)
1555 INSTANCE-NAME-TO-SYMBOL: Converts an instance name to a symbol.
1556 (instance-name-to-symbol <instance-name-expression>)
1560 3IBEGIN-ENTRY-INSTANCE_PREDICATE_FUNCTIONS
1564 INSTANCE_PREDICATE_FUNCTIONS
1566 The following predicate functions are used with instances.
1568 INSTANCEP: Returns TRUE if its argument is an instance name or instance
1569 address, FALSE otherwise.
1570 (instancep <expression>)
1572 INSTANCE-ADDRESSP: Returns TRUE if its argument is an instance address,
1574 (instance-addressp <expression>)
1576 INSTANCE-NAMEP: Returns TRUE if its argument is an instance name,
1578 (instance-namep <expression>)
1580 INSTANCE-EXISTP: Returns TRUE if the specified instance exists,
1582 (instance-existp <instance-expression>)
1586 3IBEGIN-ENTRY-INSTANCE_SLOT_FUNCTIONS
1590 INSTANCE_SLOT_FUNCTIONS
1592 The following functions are used to manipulate instance slots.
1594 DYNAMIC-GET: Returns the value of the specified slot of the active instance.
1595 (dynamic-get <slot-name-expression>)
1597 DYNAMIC-PUT: Sets the value of the specified slot of the active instance.
1598 (put <slot-name-expression> <expression>*)
1600 SLOT-REPLACE$: Allows the replacement of a range of fields in a multifield
1602 (slot-replaceR <instance-expression> <mv-slot-name>
1603 <range-begin> <range-end> <expression>+)
1605 DIRECT-SLOT-REPLACE$: Allows the replacement of a range of fields in a
1606 multifield slot value of the active instance from
1607 within a message-handler.
1608 (direct-slot-replace$ <mv-slot-name> <range-begin> <range-end> <expression>+)
1610 SLOT-INSERT$: Allows the insertion of one or more values in a multifield
1612 (slot-insert$ <instance-expression> <mv-slot-name> <index> <expression>+)
1614 DIRECT-SLOT-INSERT$: Allows the insertion of one or more values in a
1615 multifield slot value of the active instance from
1616 within a message-handler.
1617 (direct-slot-insert$ <mv-slot-name> <index> <expression>+)
1619 SLOT-DELETE$: Allows the deletion of a range of fields in a multifield
1621 (slot-delete$ <instance-expression> <mv-slot-name> <range-begin> <range-end>)
1623 DIRECT-SLOT-DELETE$: Allows the deletion of a range of fields in a multifield
1624 slot value of the active instance from within a
1626 (direct-slot-delete$ <mv-slot-name> <range-begin> <range-end>)
1630 2IBEGIN-ENTRY-DEFMODULE_FUNCTIONS
1632 The following functions provide ancillary capabilities for the defmodule
1635 GET-DEFMODULE-LIST: Returns the list of all defmodules.
1636 (get-defmodule-list)
1640 2IBEGIN-ENTRY-SEQUENCE_EXPANSION_FUNCTIONS
1642 The following functions provide ancillary capabilities for the sequence
1645 EXPAND$: When used inside of a function call, expands its arguments
1646 as separate arguements to the function. The $ operator is
1647 merely a shorthand notation for the expand$ function call.
1648 (expand$; <multifield-expression>)
1650 SET-SEQUENCE-OPERATOR-RECOGNITION: Sets the sequence operator recognition
1652 (set-sequence-operator-recognition; <boolean-expression>)
1654 GET-SEQUENCE-OPERATOR-RECOGNITION: Returns the current value of the sequence
1655 operator recognition behavior.
1656 (get-sequence-operator-recognition)
1660 1MBEGIN-ENTRY-COMMAND_SUMMARY
1664 This section gives a general overview of the available CLIPS commands.
1667 ENVIRONMENT_COMMANDS DEFFUNCTION_COMMANDS
1668 DEBUGGING_COMMANDS GENERIC_FUNCTION_COMMANDS
1669 DEFTEMPLATE_COMMANDS COOL_COMMANDS
1670 FACT_COMMANDS DEFMODULE_COMMANDS
1671 DEFFACTS_COMMANDS MEMORY_COMMANDS
1672 DEFRULE_COMMANDS TEXT_PROCESSING_COMMANDS
1673 AGENDA_COMMANDS PROFILING_COMMANDS
1678 2IBEGIN-ENTRY-ENVIRONMENT_COMMANDS
1681 ENVIRONMENT_COMMANDS
1683 The following commands control the CLIPS environment.
1685 LOAD: Loads constructs from a file.
1688 LOAD*: Loads constructs from a file without displaying informational
1692 SAVE: Saves constructs to a file.
1695 BLOAD: Loads a binary image from a file.
1698 BSAVE: Saves a binary image to a file.
1701 CLEAR: Clears the CLIPS environment.
1704 EXIT: Exits the CLIPS environment.
1707 RESET: Resets the CLIPS environment.
1710 BATCH: Executes commands from a file.
1713 BATCH*: Executes commands from a file. Unlike the batch command,
1714 evaluates all of the commands in the specified file before
1715 returning rather than replacing standard input.
1716 (batch* <file-name>)
1718 OPTIONS: Lists the settings of CLIPS compiler flags.
1721 SYSTEM: Appends its arguments together to form a command which is
1722 then sent to the operating system.
1723 (system <lexeme-expression>*)
1725 SET-AUTO-FLOAT-DIVIDEND: Sets the auto-float dividend behaviour.
1726 (set-auto-float-dividend <boolean-expression>)
1728 GET-AUTO-FLOAT-DIVIDEND: Returns the current value of the auto-float
1730 (get-auto-float-dividend)
1732 SET-DYNAMIC-CONSTRAINT-CHECKING: Sets the dynamic constraint checking
1734 (set-dynamic-constraint-checking <boolean-expression>)
1736 GET-DYNAMIC-CONSTRAINT-CHECKING: Returns the current value of the dynamic
1737 constraint checking behaviour.
1738 (get-dynamic-constraint-checking)
1740 SET-STATIC-CONSTRAINT-CHECKING: Sets the static constraint checking
1742 (set-static-constraint-checking <boolean-expression>)
1744 GET-STATIC-CONSTRAINT-CHECKING: Returns the current value of the static
1745 constraint checking behaviour.
1746 (get-static-constraint-checking)
1748 APROPOS: Displays all symbols currently defined in CLIPS which contain
1749 a specified substring
1754 2IBEGIN-ENTRY-DEBUGGING_COMMANDS
1759 The following commands control the CLIPS debugging features.
1761 DRIBBLE-ON: Sends trace information to the specified file.
1762 (dribble-on <file-name>)
1764 DRIBBLE-OFF: Closes the trace file.
1767 WATCH: Enables trace information for the specified item.
1768 (watch <watch-item>)
1769 <watch-item> ::= all |
1774 deffunctions <deffunction-name>* |
1775 globals <global-name>* |
1776 rules <rule-name>* |
1777 activations <rule-name>* |
1778 facts <deftemplate-name>* |
1779 instances <class-name>* |
1780 slots <class-name>* |
1781 message-handlers <handler-spec-1>* [<handler-spec-2>]) |
1782 generic-functions <generic-name>* |
1783 methods <method-spec-1>* [<method-spec-2>]
1785 <handler-spec-1> ::= <class-name> <handler-name> <handler-type>
1786 <handler-spec-2> ::= <class-name> [<handler-name> [<handler-type>]]
1788 <method-spec-1> ::= <generic-name> <method-index>
1789 <method-spec-2> ::= <generic-name> [<method-index>]
1791 UNWATCH: Disables trace information for the specified item.
1792 (unwatch <watch-item>)
1794 LIST-WATCH-ITEMS: Displays the current state of watch items.
1795 (list-watch-items [<watch-item>])
1799 2IBEGIN-ENTRY-DEFTEMPLATE_COMMANDS
1802 DEFTEMPLATE_COMMANDS
1804 The following commands manipulate deftemplates.
1806 PPDEFTEMPLATE: Displays the text of a given deftemplate.
1807 (ppdeftemplate <deftemplate-name>)
1809 LIST-DEFTEMPLATES: Displays the list of all deftemplates in the specified
1810 module (or the current module if none specified).
1811 (list-deftemplates [<module-name>])
1813 UNDEFTEMPLATE: Deletes a deftemplate.
1814 (undeftemplate <deftemplate-name>)
1818 2IBEGIN-ENTRY-FACT_COMMANDS
1823 The following commands display information about facts.
1825 FACTS: Display the facts in the fact-list.
1826 (facts [<module-name>]
1827 [<start-integer-expression>
1828 [<end-integer-expression>
1829 [<max-integer-expression>]]])
1831 LOAD-FACTS: Asserts facts loaded from a file.
1832 (load-facts <file-name>)
1834 SAVE-FACTS: Saves facts to a file.
1835 (save-facts <file-name> [<save-scope> <deftemplate-names>*])
1836 <save-scope> ::= visible | local
1838 DEPENDENCIES: Lists the partial matches from which a fact or
1839 instance receives logical support.
1840 (dependencies <fact-or-instance-specifier>)
1842 DEPENDENTS: Lists all facts or instances which receive logical support
1843 from a fact or instance.
1844 (dependents <fact-or-instance-specifier>)
1846 SET-FACT-DUPLICATION: Sets the fact duplication behavior.
1847 (set-fact-duplication <boolean-expression>)
1849 GET-FACT-DUPLICATION: Returns the fact duplication behavior.
1850 (get-fact-duplication)
1854 2IBEGIN-ENTRY-DEFFACTS_COMMANDS
1859 The following commands manipulate deffacts.
1861 PPDEFFACTS: Displays the text of a given deffacts.
1862 (ppdeffacts <deffacts-name>)
1864 LIST-DEFFACTS: Displays the list of all deffacts in the specified
1865 module (or the current module if none specified).
1866 (list-deffacts [<module-name>])
1868 UNDEFFACTS: Deletes a deffacts.
1869 (undeffacts <deffacts-name>)
1873 2IBEGIN-ENTRY-DEFRULE_COMMANDS
1878 The following commands manipulate defrules.
1880 PPDEFRULE: Displays the text of a given rule.
1881 (ppdefrule <rule-name>)
1883 LIST-DEFRULES: Displays the list of all defrules in the specified
1884 module (or the current module if none specified).
1885 (list-defrules [<module-name>])
1887 UNDEFRULE: Deletes a defrule.
1888 (undefrule <rule-name>)
1890 MATCHES: Displays the facts which match the patterns of a rule.
1891 (matches <rule-name>)
1893 SET-BREAK: Sets a breakpoint on a rule.
1894 (set-break <rule-name>)
1896 REMOVE-BREAK: Removes a breakpoint on a rule.
1897 (remove-break [<rule-name>])
1899 SHOW-BREAKS: Displays all rules having breakpoints.
1900 (show-breaks [<module-name>])
1902 REFRESH: Places all current activations of a rule on the agenda.
1903 (refresh <rule-name>)
1905 SET-INCREMENTAL-RESET: Sets the incremental reset behavior.
1906 (set-incremental-reset <boolean-expression>)
1908 GET-INCREMENTAL-RESET: Returns the incremental reset behavior.
1909 (get-incremental-reset)
1913 2IBEGIN-ENTRY-AGENDA_COMMANDS
1918 The following commands manipulate the agenda.
1920 AGENDA: Displays all activations on the agenda of the specified module.
1921 (agenda [<module-name>])
1923 RUN: Starts execution of rules. Rules fire until agenda is empty or
1924 the number of rule firings limit specified by the first argument
1925 is reached (infinity if unspecified).
1926 (run [<integer-expression>])
1928 FOCUS: Pushes one or more modules onto the focus stack.
1929 (focus <module-name>+)
1931 HALT: Stops rule execution.
1934 SET-STRATEGY: Sets the current conflict resolution strategy.
1935 (set-strategy <strategy>)
1936 <strategy> ::= depth | breadth | simplicity | complexity | lex | mea | random
1938 GET-STRATEGY: Returns the current conflict resolution strategy.
1941 LIST-FOCUS-STACK: Lists all module names on the focus stack.
1944 CLEAR-FOCUS-STACK: Removes all modules from the focus stack.
1947 SET-SALIENCE-EVALUATION: Sets the salience evaluation behavior.
1948 (set-salience-evaluation <behavior>)
1949 <behavior> ::= when-defined | when-activated | every-cycle
1951 GET-SALIENCE-EVALUATION: Returns the salience evaluation behavior.
1952 (get-salience-evaluation)
1954 REFRESH-AGENDA: Forces reevaluation of salience of rules on the agenda
1955 of the specified module.
1956 (refresh-agenda [<module-name>])
1960 2IBEGIN-ENTRY-DEFGLOBAL_COMMANDS
1964 The following commands manipulate defglobals.
1966 PPDEFGLOBAL: Displays the text required to define a given global variable.
1967 (ppdefglobal <global-variable-name>)
1969 LIST-DEFGLOBALS: Displays the list of all defglobals in the specified
1970 module (or the current module if none specified).
1971 (list-defglobals [<module-name>])
1973 UNDEFGLOBAL: Deletes a global variable.
1974 (undefglobal <global-variable-name>)
1976 SHOWS-DEFGLOBALS: Displays the name and current value of all defglobals
1977 in the specified module (or the current module if none
1979 (show-defglobals [<module-name>])
1981 SET-RESET-GLOBALS: Sets the reset global variables behavior.
1982 (set-reset-globals <boolean-expression>)
1984 GET-RESET-GLOBALS: Returns the reset global variables behavior.
1989 2IBEGIN-ENTRY-DEFFUNCTION_COMMANDS
1992 DEFFUNCTION_COMMANDS
1994 The following commands manipulate deffunctions.
1996 PPDEFFUNCTION: Displays the text of a given deffunction.
1997 (ppdeffunction <deffunction-name>)
1999 LIST-DEFFUNCTIONS: Displays the list of all deffunctions in the specified
2000 module (or the current module if none specified).
2001 (list-deffunctions [<deffunction-name>])
2003 UNDEFFUNCTION: Deletes a deffunction.
2004 (undeffunction <deffunction-name>)
2008 2IBEGIN-ENTRY-GENERIC_FUNCTION_COMMANDS
2011 GENERIC_FUNCTION_COMMANDS
2013 The following commands manipulate generic functions.
2015 PPDEFGENERIC: Displays the text of a given generic function header.
2016 (ppdefgeneric <generic-function-name>)
2018 PPDEFMETHOD: Displays the text of a given method.
2019 (ppdefmethod <generic-function-name> <index>)
2021 LIST-DEFGENERICS: Displays the names of all generic functions in the specified
2022 module (or the current module if none specified).
2023 (list-defgenerics [<module-name>])
2025 LIST-DEFMETHODS: Displays a list of generic function methods.
2026 (list-defmethods [<generic-function-name>])
2028 UNDEFGENERIC: Deletes a generic function.
2029 (undefgeneric <generic-function-name>)
2031 UNDEFMETHOD: Deletes a generic function method.
2032 (undefmethod <generic-function-name> <index>)
2034 PREVIEW-GENERIC: Lists all applicable methods for a particular generic
2035 function call in order of decreasing precedence.
2036 (preview-generic <generic-function-name> <expression>*)
2040 2MBEGIN-ENTRY-COOL_COMMANDS
2045 The commands manipulating the CLIPS Object-Oriented Language (COOL)
2046 are divided into four categories.
2049 CLASS_COMMANDS MESSAGE-HANDLER_COMMANDS
2050 DEFINSTANCES_COMMANDS INSTANCES_COMMANDS
2054 3IBEGIN-ENTRY-CLASS_COMMANDS
2060 The following commands manipulate defclasses.
2062 PPDEFCLASS: Displays the text of a given defclass.
2063 (ppdefclass <class-name>)
2065 LIST-DEFCLASSES: Displays the list of all defclasses in the specified
2066 module (or the current module if none specified).
2067 (list-defclasses [<module-name>])
2069 UNDEFCLASS: Deletes a defclass, all its subclasses, and all
2070 associated instances.
2071 (undefclass <class-name>)
2073 DESCRIBE-CLASS: Provides a verbose description of a class.
2074 (describe-class <class-name>)
2076 BROWSE-CLASSES: Provides a rudimentary display of the inheritance
2077 relationships between a class and all its subclasses.
2078 (browse-classes [<class-name>])
2082 3IBEGIN-ENTRY-MESSAGE-HANDLER_COMMANDS
2086 MESSAGE-HANDLER_COMMANDS
2088 The following commands manipulate defmessage-handlers. Note that
2089 <handler-type> is defined as follows:
2091 <handler-type> ::= around | before | primary | after
2093 PPDEFMESSAGE-HANDLER: Displays the text of a given defmessage-handler.
2094 (ppdefmessage-handler <class-name> <handler-name> [<handler-type>])
2096 LIST-DEFMESSAGE-HANDLERS: Displays a list of all (or some) defmessage-
2098 (list-defmessage-handlers [<class-name> [<handler-name> [<handler-type>]]])
2100 UNDEFMESSAGE-HANDLER: Deletes a defmessage-handler.
2101 (undefmessage-handler <class-name> <handler-name> [<handler-type>])
2103 PREVIEW-SEND: Displays a list of all the applicable message-handlers for
2104 a message sent to an instance of a particular class.
2105 (preview-send <class-name> <message-name>)
2109 3IBEGIN-ENTRY-DEFINSTANCES_COMMANDS
2113 DEFINSTANCES_COMMANDS
2115 The following commands manipulate definstances.
2117 PPDEFINSTANCES: Displays the text of a given definstances.
2118 (ppdefinstances <definstances-name>)
2120 LIST-DEFINSTANCES: Displays the list of all definstances in the specified
2121 module (or the current module if none specified).
2122 (list-definstances [<module-name>])
2124 UNDEFINSTANCES: Deletes a definstances.
2125 (undefinstances <definstances-name>)
2129 3IBEGIN-ENTRY-INSTANCES_COMMANDS
2135 The following commands manipulate instances of user-defined classes.
2137 INSTANCES: Displays a list of instances.
2138 (instances [<module-name> [<class-name> [inherit]]])
2140 PPINSTANCE: Prints the slots of the active instance when called from
2141 within the body of a message-handler.
2144 SAVE-INSTANCES: Saves all instances to the specified file.
2145 (save-instances <file-name>)
2147 LOAD-INSTANCES: Loads instances from the specified file.
2148 (load-instances <file-name>)
2150 RESTORE-INSTANCES: Loads instances from the specified file.
2151 (restore-instances <file-name>)
2155 2IBEGIN-ENTRY-DEFMODULE_COMMANDS
2160 The following commands manipulate defmodules.
2162 PPDEFMODULE: Displays the text of a given defmodule.
2163 (ppdefmodule <defmodule-name>)
2165 LIST-DEFMODULES: Displays the list of all defmodules.
2168 SET-CURRENT-MODULE: Sets the current module.
2169 (set-current-module <module-name>)
2171 GET-CURRENT-MODULE: Returns the current module.
2172 (get-current-module)
2176 2IBEGIN-ENTRY-MEMORY_COMMANDS
2181 The following commands display CLIPS memory status information.
2183 MEM-USED: Returns number of bytes of memory CLIPS is using.
2186 MEM-REQUESTS: Returns the number of times CLIPS has requested memory
2187 from the operating system.
2190 RELEASE-MEM: Releases all free memory held internally by CLIPS by to
2191 the operating system. Returns the amount of memory freed.
2194 CONSERVE-MEM: Turns on or off the storage of information used for the
2195 save and pretty-print commands.
2196 (conserve-mem <status>)
2197 <status> ::= on | off
2201 2IBEGIN-ENTRY-TEXT_PROCESSING_COMMANDS
2204 TEXT_PROCESSING_COMMANDS
2206 The following commands can be used by users to maintain their own
2207 information system similar to the help facility.
2209 FETCH: Loads the named file into the internal lookup table.
2212 PRINT-REGION: Looks up the specified entry in a particular file which has
2213 been previously loaded into the lookup table and prints the
2214 contents of that entry to the specified logical name.
2215 (print-region <logical-name> <lookup-file> <topic-field>*)
2217 TOSS: Unloads the named file from the internal lookup table.
2222 2IBEGIN-ENTRY-PROFILING_COMMANDS
2227 The following commands provide the ability to profile CLIPS programs
2230 SET-PROFILE-PERCENT-THRESHOLD: Sets the minimum percentage of time that
2231 must be spent executing a construct or user
2232 function for it to be displayed by the
2233 profile-info command.
2234 (set-profile-percent-threshold <number in the range 0 to 100>)
2236 GET-PROFILE-PERCENT-THRESHOLD: Returns the current value of the
2237 profile percent threshold.
2238 (get-profile-percent-threshold)
2240 PROFILE-RESET: Resets all profiling information currently collected
2241 for constructs and user functions.
2244 PROFILE-INFO: Displays profiling information currently collected for
2245 constructs or user functions.
2248 PROFILE: Enables/disables profiling of constructs and user
2250 (profile constructs | user-functions | off)
2254 1MBEGIN-ENTRY-INTEGRATED_EDITOR
2258 CLIPS includes a fully integrated version of the full screen MicroEMACS
2259 editor. You may call the editor from CLIPS, compile full buffers or just
2260 sections of the editor (incremental compile), temporarily exit the editor back
2261 to CLIPS, or permanently exit the editor. Since the editor is full screen,
2262 portions of it are highly machine dependent. As it is currently set up, the
2263 editor will run on VAX VMS machines using VT100- or VT240-compatible
2264 terminals, UNIX systems which support TERMCAP, the IBM PC, and most IBM
2268 USING_THE_EDITOR EXTENDED_COMMANDS
2269 CONTROL_COMMANDS META_COMMANDS
2273 2IBEGIN-ENTRY-USING_THE_EDITOR
2278 The editor may be called from CLIPS with the following command:
2280 (edit ["<file-name>"])
2282 The file name is optional. If one is given, that file would be loaded. If no
2283 file name is given, the editor is entered without loading a file. Once in the
2284 file, all of the EMACS commands listed below are applicable. To exit the
2285 editor and clear all buffers, use <Ctrl-Z> or <Ctrl-X><Ctrl-C>. To
2286 temporarily exit the editor and retain the information in the buffers, use
2287 <Ctrl-X> Q. To compile a rules section, mark a region and type
2288 <Ctrl-X><Ctrl-T>. To compile the entire buffer, use <Meta-T>. The editor can
2289 use extensive amounts of memory and a flag is available in clips.h to remove
2290 all of the editor code.
2292 When using the editor on multiuser machines like the VAX or many UNIX
2293 environments, be careful with the control S and control Q commands; they could
2294 conflict with terminal XON/XOFF communications. All of the control S commands
2295 have a work around built into the editor. The save file command, normally
2296 <Ctrl-X><Ctrl-S>, is also <Meta> Z. The forward search command, normally
2297 <Ctrl-S>, is also <Meta> J. The control Q command is rarely needed in a CLIPS
2298 file and, therefore, has no substitute.
2300 The following two special characters should be noted when using the editor.
2302 <del> Delete previous character.
2303 (also <ctrl-H> on some terminals)
2304 <esc> Meta command prefix.
2305 (also <ctrl-[> on some terminals)
2309 2IBEGIN-ENTRY-CONTROL_COMMANDS
2314 These commands are entered by pressing the control key along with the
2315 designated character.
2317 <ctrl-@> Set mark at current position.
2318 <ctrl-A> Move cursor to beginning of line.
2319 <ctrl-B> Move cursor BACK one character.
2320 <ctrl-C> Start a new interactive command shell. Be careful!
2321 <ctrl-D> DELETE character under cursor.
2322 <ctrl-E> Move cursor to END of line.
2323 <ctrl-F> Move cursor FORWARD one character.
2324 <ctrl-G> Abort any command.
2325 <ctrl-H> (backspace) delete previous character.
2326 <ctrl-I> Insert a TAB.
2327 <ctrl-J> Insert a CR-LF and indent next line.
2328 <ctrl-K> KILL (delete) to end of line.
2329 <ctrl-L> Redisplay screen.
2330 <ctrl-M> Insert a CR-LF.
2331 <ctrl-N> Move cursor to NEXT line.
2332 <ctrl-O> OPEN a new line.
2333 <ctrl-P> Move to PREVIOUS line.
2334 <ctrl-Q> QUOTE the next character (insert the next character typed).
2335 <ctrl-R> Reverse SEARCH.
2336 <ctrl-S> Forward SEARCH (also <Meta-J>).
2337 <ctrl-T> TRANSPOSE characters.
2338 <ctrl-U> Enter repeat count for next command.
2339 <ctrl-V> VIEW the next screen (scroll up one screen).
2340 <ctrl-W> KILL region (all text between cursor and last mark set).
2341 <ctrl-X> Extended command prefix - see below.
2342 <ctrl-Y> YANK (undelete) last text killed.
2343 <ctrl-Z> Quick save of file in current buffer (only) and exit.
2347 2IBEGIN-ENTRY-EXTENDED_COMMANDS
2352 These commands are entered by first pressing the control key along with the
2353 'x' character and then pressing the designated character.
2355 <ctrl-X>( Begin keyboard Macro.
2356 <ctrl-X>) End keyboard Macro.
2357 <ctrl-X>! Execute a single external command.
2358 <ctrl-X>= Show current cursor column and line number.
2359 <ctrl-X>: Go to a specific line number.
2360 <ctrl-X>1 Display current window only.
2361 <ctrl-X>2 Split the current window.
2362 <ctrl-X>B Switch to a different BUFFER.
2363 <ctrl-X>E EXECUTE keyboard Macro.
2364 <ctrl-X>F Set FILL column.
2365 <ctrl-X>K KILL a buffer (other than current buffer).
2366 <ctrl-X>M MATCH parenthesis (or {} or []).
2367 <ctrl-X>N Move to NEXT window.
2368 <ctrl-X>P Move to PREVIOUS window.
2369 <ctrl-X>R Global search and REPLACE (backwards).
2370 <ctrl-X>S Global SEARCH and replace (forwards).
2371 <ctrl-X>Z Enlarge current window by repeat count <ctrl-U> lines.
2373 <ctrl-X><ctrl-B> Show active BUFFERS.
2374 <ctrl-X><ctrl-C> Exit without saving buffers.
2375 <ctrl-X><ctrl-F> FIND file. Load if not already in buffer.
2376 <ctrl-X><ctrl-N> Scroll current window up by repeat count lines.
2377 <ctrl-X><ctrl-P> Scroll current window down by repeat count lines.
2378 <ctrl-X><ctrl-R> RENAME file. Change file name for buffer.
2379 <ctrl-X><ctrl-S> SAVE (write) current buffer into its file.
2380 <ctrl-X><ctrl-V> VISIT a file. Read file and display in current window.
2381 <ctrl-X><ctrl-W> WRITE buffer to file. Option to change name of file.
2382 <ctrl-X><ctrl-Z> Reduce current window by repeat count lines.
2386 2IBEGIN-ENTRY-META_COMMANDS
2391 These commands are entered by first pressing the meta key (Activated by <esc>
2392 or <ctrl-[>) and then pressing the designated character.
2394 <meta>! Move current line to repeat count lines from top of
2396 <meta>> Move cursor to end of buffer.
2397 <meta>< Move cursor to beginning of buffer.
2399 <meta>B Move cursor BACK one word.
2400 <meta>C CAPITALIZE first letter of word.
2401 <meta>D DELETE next word.
2402 <meta>F Move cursor FORWARD one word.
2403 <meta>J SEARCH forward (same as <ctrl-S>).
2404 <meta>L LOWERCASE (lowercase) next word.
2405 <meta>R Query search and REPLACE (backwards).
2406 <meta>S Query SEARCH and replace (forwards).
2407 <meta>U UPPERCASE (uppercase) next word.
2408 <meta>V VIEW the previous screen (scroll down one screen).
2409 <meta>W COPY region into kill buffer.
2410 <meta>Z SAVE current buffer into file (same as
2412 <meta><del> DELETE previous word.