4.33 Global variables
AllApplicationManualNameSummaryHelp

  • 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
b_setval(+Name, +Value)
Associate the term Value with the atom Name or replace the currently associated value with Value. On backtracking the assignment is reversed. If the variable Name did not exist before calling b_setval/2, backtracking causes the variable to be deleted.146Prior to version 8.3.28 backtracking over the variable creation caused the variable to get the value [], i.e., the empty list. If this is desirable use nb_setval(Var, []) before b_setval/2.