|
|
I can do with CUT: msg#01595
|
Subject: |
I can do with CUT |
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.
Sent from the SWI Prolog forum at Nabble.com:
I can do with CUT
|
| |