• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • CPACK
    • Home
    • List packs
    • Submit pack
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

A.27 library(main): Provide entry point for scripts
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • The SWI-Prolog library
        • library(main): Provide entry point for scripts
          • main/0
          • argv_options/3
          • argv_options/4
          • argv_usage/1
          • cli_parse_debug_options/2
          • cli_debug_opt_type/3
          • cli_debug_opt_help/2
          • cli_debug_opt_meta/2
          • cli_enable_development_system/0
    • Packages
Availability::- use_module(library(main)).(can be autoloaded)
Sourcecli_debug_opt_type(-Flag, -Option, -Type)
cli_debug_opt_help(-Option, -Message)
cli_debug_opt_meta(-Option, -Arg)
Implements opt_type/3, opt_help/2 and opt_meta/2 for debug arguments. Applications that wish to use these features can call these predicates from their own hook. Fot example:
opt_type(..., ..., ...).	% application types
opt_type(Flag, Opt, Type) :-
    cli_debug_opt_type(Flag, Opt, Type).
% similar for opt_help/2 and opt_meta/2

main(Argv) :-
    argv_options(Argv, Positional, Options0),
    cli_parse_debug_options(Options0, Options),
    ...
ClioPatria (version V3.1.1-51-ga0b30a5)