Runtime systems may or may not have an automatically generated
main program. This is controlled by the --main option to
spld
. If --main=user is given, a function
user_main()
must be supplied:
int user_main(int argc, char *argv[])
user_main()
is responsible for initializing the Prolog engine,
loading code, and issuing any Prolog queries. An
alternative is to use --main=none and write your own
main()
function.
• Initializing the Prolog Engine: | Initializing the Prolog Engine | |
• Loading Prolog Code: | Loading Prolog Code |