top:-
initialize_bp,
get_main_args(L),
call_you_program.
where initialize_bp initializes the B-Prolog system (symbol
tables, global variables, etc.), and get_main_args(L) fetches
the command arguments into L as a list of atoms.
exec $BPDIR/Emulator/bprolog ... $BPDIR/bp.outIn this way, your program rather than the B-Prolog interpreter will be executed first. In Version 3.1 or newer, you can use the bi-directional interface with C to build stand-alone applications.
![]()
exec $BPDIR/Emulator/bprolog ... myprog.out $BPDIR/bp.out