[ ECLiPSe Prolog Environment built-in.|Group Index| Full Index]

current_struct(?Struct)

Succeeds if Struct is a currently visible structure specification.

?Struct
Variable or structure.

Description

Used to retrieve the definition of a defined structure, or to enumerate all visible structure definitions.

Fail Conditions

None.

Resatisfiable

Yes.

Exceptions

(5) Type error
Struct is neither variable nor structure.

Examples


    [eclipse 1]: local struct(employee(name,age,salary)).

    yes.
    [eclipse 3]: current_struct(employee(A,B,C)).

    A = name
    B = age
    C = salary
    yes.
    [eclipse 3]: current_struct(S).

    S = employee(name, age, salary)     More? (;) 

    S = suspend(inst, constrained, bound)
    yes.

Error:
   current_struct(a).             (Error 5).


See Also

local / 1, global / 1, struct / 1