From nangelop@csd.abdn.ac.uk  Wed Aug 30 10:44:58 2000
Received: from pigeon.csd.abdn.ac.uk (root@pigeon.csd.abdn.ac.uk [139.133.200.15])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id KAA06880
	for <prolog@swi.psy.uva.nl>; Wed, 30 Aug 2000 10:44:58 +0200 (MET DST)
Received: from kea (nangelop@kea [139.133.200.24])
	by pigeon.csd.abdn.ac.uk (8.11.0/8.11.0) with ESMTP id e7U8j0526811;
	Wed, 30 Aug 2000 09:45:01 +0100 (BST)
Date: Wed, 30 Aug 2000 09:45:00 +0100
From: Nicos Angelopoulos <nangelop@csd.abdn.ac.uk>
To: Samuel Allan <Samuel.Allan@shihad.zzn.com>
cc: prolog@swi.psy.uva.nl
Subject: Re: What do these mean?
In-Reply-To: <9538113820E74D11DACC0005B813E913@Samuel.Allan.shihad.zzn.com>
Message-ID: <Pine.SGI.4.21.0008300935530.140265-100000@kea.csd.abdn.ac.uk>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII



On Wed, 30 Aug 2000, Samuel Allan wrote:

> I'm a student taking a course in declarative programming, and while I 
> have a study guide it doesn't seem to cover a few things.
>
	you may want to consider borrowing a book,
	some titles are recommended at 
	http://warbase.selwerd.cx/~dirk-jan/prolog/faq/

	(which is the FAQ for comp.lang.prolog - just in case)
 
> What does this operator mean?  ->
> 
> Why did Richard O'Keefe use the two structures(?) integer(Index) and 
> var(Index)?
> I'm guessing to check the type of Index.
> 
> Could the combination ( integer(Index) -> blah blah ) be to sort of 
> nest if statements (like the logical implication might be used)? If 
> so, why use "->" instead of ","?
> 


	-> is the if operator and can be used as if-then, and if-then-else
	
	for swi prolog you can look at section 3.8 of the manual
	

	also integer/1 and var/1 are built-ins which succeed if their
argument is of the particular type (see predicate index of swi manual, 
or one of the books)

nicos.
	


