Skip to content

clips.BatchStar() and (batch ...) not working together #5

Description

@gitttt

I have three files:
1.) A python file test.py:

import clips
PATH_TO_CLP_FILE = r'd:\temp\batch_bug.clp'
clips.BatchStar(PATH_TO_CLP_FILE)
clips.PrintFacts()

2.) A file batch_bug.clp:

(assert (asdf0))
(batch "D:\\temp\\batchbug2.clp")
(assert (asdf1))
(printout t (facts))

And finally a file batchbug2.clp:
(assert (fdsa))

python test.py results in the following output:

f-0     (initial-fact)
f-1     (asdf0)
f-2     (asdf1)
For a total of 3 facts.

[ENVRNMNT8] Environment data not fully deallocated.

[ENVRNMNT8] MemoryAmount = 22.

[ENVRNMNT8] MemoryCalls = 1.

This is not what I expected because there is no "fdsa" fact, i.e. calling (batch "D:\\temp\\batchbug2.clp") did not work. In addition, there are the [ENVRNMNT8] messages. What is going on here?

EDIT:

I found out about the CLIPS batch*(...) command. And using this instead of the batch(...) works as expected. Why is that?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions