Dear Srini,
You cannot write the program in the toplevel, you have to write a file with the program:
% ---------------- greet.pl ---------------- %
greet(hamish):- write('How are you doin, pal?'). greet(amelia):- write('Awfully nice to see you!').
% ------------------------------------------ %
And load it in the toplevel:
?- ensure_loaded(greet). yes ?- greet(X). How are you doin, pal? X = hamish ? ; Awfully nice to see you! X = amelia ? ;
no ?-
Regards,
Daniel
============================================================================== 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/ -----------------------------------------------------------------------------