logo       

VERY URGENT, CUT AND FINDALL/3: msg#01576

Subject: VERY URGENT, CUT AND FINDALL/3
 Hi,
   
  I have an urgent doubt. For example when I ask to prolog
   
  ?- member( 3, [1,2,3]).
  Yes
   
  Is there any system variable associated with the prolog answer "Yes" or "No" ???
   
  I have this doubt because I want to use the answer in programs (e.g. if answer=Yes then ....)
   

   
 
I know that is possible with :
The goal member(3,[1,2,3]) succeeds and you can use that in a
conjunction or in an if-then-else, as in

            member(3,[1,2,3]), writeln('3 is a member of [1,2,3])

or

        (member(3,[1,2,3]) ->
                writeln(success)
        ;
                writeln(failure)
        )

but I need to Know how I can do with CUT.



And I want to know a program write a list who not belongs simultaniosly a two lists, and i want to use findall/3.
For example:
A=[1,2,3,4,5,6].
B=[3,4,8,7,6,1].
L=[2,5,8,7].









Sent from the SWI Prolog forum at Nabble.com:
VERY URGENT, CUT AND FINDALL/3
<Prev in Thread] Current Thread [Next in Thread>