clips

Why do some CLIPS function names end with $?


Why do some builtin function names in CLIPS end with a $, such as explode$ ? What is the significance of this?


Solution

  • The $ indicates they either accept or return a multifield value. Multifield variables begin with a $, so that is why that particular character is used. If you use the apropos function, you can quickly get a list of functions containing the $ character.

             CLIPS (6.4.1 4/8/23)
    CLIPS> (apropos $)
    slot-replace$
    delete$
    expand$
    slot-direct-replace$
    rest$
    slot-direct-insert$
    delete-member$
    explode$
    slot-delete$
    first$
    progn$
    replace-member$
    insert$
    member$
    nth$
    slot-insert$
    union$
    implode$
    slot-direct-delete$
    replace$
    create$
    length$
    difference$
    intersection$
    subseq$
    CLIPS>