site Search:


 
    All Forums Hot Topics Gallery






how-to block ads


 
Search Topic:
Uniqs:
2027
Share Topic
Post a:
Post a:
AuthorAll Replies

navred

join:2005-02-12

If-else in PRolog

HI, please help me in writing function for the following in prolog:

I want to write a function in prolog for the if-else statement.
For ex,
if-instantiated( X,X) else if-instantiated (Y,Y) else if-instantiated( X^Y, concat(X,Y):-
If the attribute X is instantiated( holds some value) then write X, else if the attribute Y holds some value then write Y, else if both the attributes X and Y hold some values, then append X and Y and write them.
I know how to write the concat function. But I am unaware of writing the function for the above if-else rule. please help me.
Thanks in advance,
SUDHA.P

Thursday, 23-May 03:25:08 Terms of Use & Privacy | feedback | contact | Hosting by nac.net - DSL,Hosting & Co-lo
over 13.5 years online © 1999-2013 dslreports.com.
Most commented news this week
Hot Topics