A.47 library(settings): Setting management
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • The SWI-Prolog library
        • library(settings): Setting management
          • setting/4
          • setting/2
          • env/2
          • env/3
          • set_setting/2
          • restore_setting/1
          • set_setting_default/2
          • load_settings/1
          • load_settings/2
          • save_settings/0
          • save_settings/1
          • current_setting/1
          • setting_property/2
          • list_settings/0
          • list_settings/1
          • convert_setting_text/3
    • Packages
Availability::- use_module(library(settings)).(can be autoloaded)
Source[det]set_setting(:Name, +Value)
Change a setting. Performs existence and type-checking for the setting. If the effective value of the setting is changed it broadcasts the event below.
settings(changed(Module:Name, Old, New))

Note that modified settings are not automatically persistent. The application should call save_settings/0 to persist the changes.

Errors
- existence_error(setting, Name)
- type_error(Type, Value)