next up previous

13.1.3 Loading a Binary Image

Loads the constructs stored in the binary file specified by <file-name> into the environment. The specified file must have been created by bsave. Loading a binary image is quicker than using the load command to load a ASCII text file. A bload clears all constructs from the current CLIPS environment (as well as all facts and instances). Bload can be called at any time unless some constructs that bload will affect are in use (e.g. a deffunction is currently executing). The only constructive/destructive operation that can occur after a bload is the clear command or the bload command (which clears the current binary image). This means that constructs cannot be loaded or deleted while a bload is in effect. In order to add constructs to a binary image, the original ASCII text file must be reloaded, the new constructs added, and then another bsave must be performed. This function has no return value. This function returns TRUE if the file was successfully bloaded, otherwise FALSE is returned.

Binary images can be loaded into different compile-time configurations of CLIPS, as long as the same version of CLIPS is used and all the functions and constructs needed by the binary image are supported. In addition, binary images should theoretically work across different hardware platforms if internal data representations are equivalent (e.g. same integer size, same byte order, same floating-point format, etc). However, it is NOT recommended that this be attempted.

Syntax

(bload <file-name>)


next up previous