info-gnuprologjava
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Info-gnuprologjava] hi problem with constant term


From: Daniel Thomas
Subject: Re: [Info-gnuprologjava] hi problem with constant term
Date: Tue, 03 Jan 2012 13:50:57 +0000

Hello Jagadish Koneti,

All the term classes extend gnu.prolog.term.Term, in particular AtomTerm
is used to represent prolog atoms (strings) and IntegerTerm and
FloatTerm represent numbers. AtomTerm.get(String) gets you the Term
representing that string.

I may however be misunderstanding what you mean by constant term. Most
Terms are immutable and usually unique for what they represent in that
the same string etc. will always map to the same Term instance, however
this is not always true with numbers and potentially some other side
cases.

You may find
http://www.gnu.org/software/gnuprologjava/manual/Using-the-API.html#Using-the-API
 helpful as it details constructing terms and executing them.

I hope that helps,

Daniel

On Tue, 2012-01-03 at 14:56 +0530, Jagadish Koneti wrote:
> Hi ,
> 
>  
> 
>   I am new to GNU Prolog for Java and prolog as well . I want to write
> a constant term to query to the prolog database . but I could not find
> any class for constant term class in the package . can any please
> guide me how to write a constant term with the help of gnu prolog for
> java  api .
> 
>  
> 
>  
> 
> Thanks 
> 
>  
> 
> Jagadish koneti.
> 
> 
> **************** CAUTION - Disclaimer *****************
> This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
> for the use of the addressee(s). If you are not the intended recipient, 
> please 
> notify the sender by e-mail and delete the original message. Further, you are 
> not 
> to copy, disclose, or distribute this e-mail or its contents to any other 
> person and 
> any such actions are unlawful. This e-mail may contain viruses. Infosys has 
> taken 
> every reasonable precaution to minimize this risk, but is not liable for any 
> damage 
> you may sustain as a result of any virus in this e-mail. You should carry out 
> your 
> own virus checks before opening the e-mail or attachment. Infosys reserves 
> the 
> right to monitor and review the content of all messages sent to or from this 
> e-mail 
> address. Messages sent to or from this e-mail address may be stored on the 
> Infosys e-mail system.
> ***INFOSYS******** End of Disclaimer ********INFOSYS***

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]