A.36.3.2 Reflective access to options
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • The SWI-Prolog library
        • library(predicate_options): Declare option-processing of predicates
          • Improving on the current situation
            • Reflective access to options
              • predicate_options/3
              • assert_predicate_options/4
              • current_predicate_option/3
              • check_predicate_option/3
              • current_option_arg/2
              • current_predicate_options/3
              • check_predicate_options/0
              • derive_predicate_options/0
              • retractall_predicate_options/0
              • derived_predicate_options/3
              • derived_predicate_options/1
    • Packages
Availability::- use_module(library(predicate_options)).(can be autoloaded)
Source[nondet]current_predicate_option(:PI, ?Arg, ?Option)
True when Arg of PI processes Option. For example, the following is true:
?- current_predicate_option(open/4, 4, type(text)).
true.

This predicate is intended to support conditional compilation using if/1 ... endif/0. The predicate current_predicate_options/3 can be used to access the full capabilities of a predicate.