• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • 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

11.4.14 Miscellaneous
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • Foreign Language Interface
        • The Foreign Include File
          • Miscellaneous
            • Term Comparison
            • Recorded database
            • Getting file names
            • Dealing with Prolog flags from C
              • PL_set_prolog_flag()
    • Packages

11.4.14.4 Dealing with Prolog flags from C

Foreign code can set or create Prolog flags using PL_set_prolog_flag(). See set_prolog_flag/2 and create_prolog_flag/3.175The current C API does not provide for a dedicated mechanism for fetching the value of Prolog flags. Relatively slow access is provided by calling PL_call_predicate() using current_prolog_flag/2.

int PL_set_prolog_flag(const char *name, int type, ...)
Set/create a Prolog flag from C. name is the name of the affected flag. type is one of the values below, which also dictates the type of the final argument. The function returns TRUE on success and FALSE on failure. This function can be called before PL_initialise(), making the flag available to the Prolog startup code.
PL_BOOL
Create a boolean (true or false) flag. The argument must be an int.
PL_ATOM
Create a flag with an atom as value. The argument must be of type const char *.
PL_INTEGER
Create a flag with an integer as value. The argument must be of type intptr_t *.

ClioPatria (version V3.1.1-21-gb8003bb)