IF Computer > MINERVA > Example Programs > MINERVA Features > Directives > init

init

MINERVA
ifcomputer logo
f
Expert Services on the Web

% abc_library.min % % note that predicates starting with a '_' are not published in % the generated *.mpk file

% the predicate specified in the directive 'init' (if defined) % will be invoked at load time.

:- init('_abc_init').

'_abc_init' :- write('initializing abc_library...'),nl.

abc_f1(x). abc_f2(y). abc_f3(z).

abc_f4(X) :- '_abc_internal'(X).

'_abc_internal'(1).

% example.min % % Use the directive package to declare all predicates of a package. % The package will by dynamically loaded when one of its predicates % is first accessed.

% If there is a directive 'init' defined in the package, it will % be invoked at load time

% packages are produced with minervac or minervax.

:- package(abc_library).

main(_Args) :- abc_f1(X), abc_f2(Y), abc_f3(Z), writeq(xyz(X,Y,Z)),nl.

document: http://www.ifcomputer.co.jp/MINERVA/ExamplePrograms/MinervaFeatures/Directives/init/print_en.html
published 2008/7/21 update 2001/3/22 (c) 1996-2006 IF Computer Japan
IF Computer 5-28-2 Sendagi, Bunkyo-ku Tel +81-3-5814-3352 info@ifcomputer.com
Customer Support Tokyo 113-0022 Japan   http://www.ifcomputer.com
Back> managed with ubiCMS