Subject: Re: What do these mean?

From: Nicos Angelopoulos <[email-masked]>
Date: Wed, 30 Aug 2000 09:45:00 +0100

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.