• 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

4.33 Global variables
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • Built-in Predicates
        • Global variables
          • b_setval/2
          • b_getval/2
          • nb_setval/2
          • nb_getval/2
          • nb_linkval/2
          • nb_current/2
          • nb_delete/1
          • Compatibility of SWI-Prolog Global Variables
    • Packages
Availability:built-in
nb_getval(+Name, -Value)
The nb_getval/2 predicate is a synonym for b_getval/2, introduced for compatibility and symmetry. As most scenarios will use a particular global variable using either non-backtrackable or backtrackable assignment, using nb_getval/2 can be used to document that the variable is non-backtrackable. Raises existence_error(variable, Name) if the variable does not exist. Alternatively, nb_current/2 can used to query a global variable. This version fails if the variable does not exist rather than raising an exception.
ClioPatria (version V3.1.1-51-ga0b30a5)