Dear Jeff,
Yes, listing/0 has a strange behaviour, but I should say that it is almost deprecated now in Ciao (note that it does not even appear in the manual!). It is provided for historical reasons, though, but probably what you want to do can be done better by other means. Can I ask you what are you using it for?
The development methodology in most modern Prolog systems (including Ciao) is to write the program in one or more files and then either compile the program or load it into the top level. Thus, it is not necessary to list the 'loaded program': it suffices with looking at the original file(s).
In some ways listing/0 is a residue of the older style in which users often developed applications by typing in clauses at the top level and saving the state every now and then. In such an environment listing/0 was used to check what had been typed so far. It should not be necessary anymore...
Anyway, to use it the way you want, you can do, in the interpreter:
?- use_module(library(dynamic)).
?- current_predicate(X), listing(X), fail.
Note that this lists only the dynamic (and data) predicates.
Regards,
Paco Bueno & The Ciao Team ============================================================================== Message: Address: Action: help majordomo(a)clip.dia.fi.upm.es Info. on useful commands subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this list <whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list ----------------------------------------------------------------------------- Archived messages: http://www.clip.dia.fi.upm.es/Mail/ciao-users/ -----------------------------------------------------------------------------