[ Obsolete | The ECLiPSe Built-In Predicates | Reference Manual | Alphabetic Index ]
current_struct(?Struct)
Succeeds if Struct is a currently visible structure specification.
- ?Struct
- Variable or structure.
This built-in predicate is obsolete!
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 2]: current_struct(employee(A,B,C)).
A = name
B = age
C = salary
yes.
[eclipse 3]: Emp = employee with [], current_struct(Emp).
Emp = employee(name, age, salary)
yes.
[eclipse 4]: current_struct(S).
S = employee(name, age, salary) More? (;)
S = suspend(inst, constrained, bound)
yes.
Error:
current_struct(a). (Error 5).
See Also
current_struct / 2, local / 1, struct / 1