Used to retrieve the definition of a defined structure, or to enumerate all visible structure definitions.
Visible structures are those which have either been declared locally, exported, or which have been imported or reexported from another module.
:- local struct(employee(name,age,salary)).
?- current_struct(employee, Spec).
Spec = employee(name, age, salary)
yes.
?- current_struct(Name, Spec).
Name = employee
Spec = employee(name, age, salary)
More (0.00s cpu) ? ;
Name = suspend
Spec = suspend(inst, constrained, bound)
More (0.00s cpu) ? ;
No (0.00s cpu)
?- current_struct(book, Spec).
No (0.00s cpu)