[ ECLiPSe Recorded Database built-in.|Group Index| Full Index]

local_record(+Key)

Declare the record with key Key to be local to the caller module

+Key
Key specification of the form Name/Arity or just Name.

Description

Declare the record with key Key to be local to the caller module.

Key is equal to Key/0.

Fail Conditions

None.

Resatisfiable

No.

Exceptions

(4) Instantiation fault
Key is not instantiated.
(5) Type error
Key is not of the form Atom or Atom/Integer.
(44)
Key is already the key of a local record.

Examples


Success:
      [eclipse]: module(numbers).
      [numbers]: local_record(type/0).
      yes
      [numbers]: record(type, integer),
              record(type, real),
              record(type, fractional).
      yes.
      [numbers]: module(beer).
      [beer]: local_record(type),
              record(type, lager),
              record(type, stout).
      yes.
      [beer]: recorded(type, Type).
      Type = lager     More? (;)
      Type = stout     More? (;)
      no (more) solution.
      [beer]: module(numbers).
      [numbers]: recorded(type, Type).
      Type = integer     More? (;)
      Type = real     More? (;)
      Type = fractional     More? (;)
      no (more) solution.
      [numbers]: module(other).
      [other]: recorded(type, Type).
      no (more) solution.

Error:
      local_record(X).               (Error 4).
      local_record(123).             (Error 5).
      local_record(key/3),
          local_record(key/3).       (Error 44).


See Also

abolish_record / 1, erase / 2, erase_all / 1, record / 2, recorded / 2