5

In SWI-Prolog's settings library, is there a different between the following:

  • scope:set_setting(Key, Value) and set_setting(scope:Key, Value)
  • scope:setting(Key, Value) and setting(scope:Key, Value)
  • :- scope:setting(Key, Type, Default, Doc) and :- setting(scope:Key, Type, Default, Doc)

In addition: can scope be anything but user and a currently loaded module name?

Wouter Beek
  • 3,307
  • 16
  • 29

1 Answers1

0

Difference between scope:setting(Key, Value) and setting(scope:Key, Value)

settings are local to the module and they cannot be called as a predicate and can only be declared as a directive.

setting(Key, Value) only enumerates the settings of the current module. All settings can be enumerated using setting(Module:Name, Value). This predicate is deterministic if Name is ground.

set_settings changes the settings.

Anton Danilov
  • 1,246
  • 11
  • 26