A.25 library(main): Provide entry point for scripts
AllApplicationManualNameSummaryHelp

  • 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_enable_development_system/0
    • Packages
Availability::- use_module(library(main)).(can be autoloaded)
Source[det]argv_options(:Argv, -Positional, -Options, +ParseOptions)
As argv_options/3 in guided mode, Currently this version allows parsing argument options throwing an exception rather than calling halt/1 by passing an empty list to ParseOptions. ParseOptions:
on_error(+Goal)
If Goal is halt(Code), exit with Code. Other goals are currently not supported.
options_after_arguments(+Boolean)
If false (default true), stop parsing after the first positional argument, returning options that follow this argument as positional arguments. E.g, -x file -y results in positional arguments [file, '-y']