Node:Initializations, Next:, Previous:Declarations, Up:Load Intro



Initializations

A directive

     :- initialization :Goal.  [ISO]
     

in a file includes Goal to the set of goals which shall be executed after that file has been loaded.

initialization/1 is actually callable at any point during loading of a file. Initializations are saved by save_modules/2 and save_program/[1,2], and so are executed after loading or restoring such files too.

Goal is associated with the file loaded, and with a module, if applicable. When a file, or module, is going to be reloaded, all goals earlier installed by that file, or in that module, are removed first.