Dear Srini,
note that you cannot type clauses into the top level like
that. Instead, create a file, say foo.pl, that contains:
:- module(_,_).
greet(hamish):-
write('How are you doin, pal?').
greet(amelia):-
write('Awfully nice to see you!').
and load it into the top level doing:
?- use_module(foo).
Then, you can do, for example:
?- greet(hamish).
In fact, the best way to do it is from the graphical (emacs) iterface:
open the file with emacs and do "C-cl" (or push the load button on the
toolbar).
--
----------------------- The Ciao System Development Team --------------------
The CLIP Group | Technical University of Madrid
ciao(a)clip.dia.fi.upm.es | University of New Mexico
http://www.cliplab.org /
http://www.ciaohome.org
-----------------------------------------------------------------------------
==============================================================================
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/
-----------------------------------------------------------------------------