Re: Getting status of a free variable.



I dont know if I understood exactly, but it seems to me that you have just
to invert clauses, that is:

sillabo(Word,[Last,Current | T]) :-
nonvar(Last), !, ...

sillabo(Word,[H|T]) :- ....

Cheers
/\/\


"andrea" <kerny404@xxxxxxxxx> ha scritto nel messaggio
news:1165924229.460939.58060@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello everyone,
Maybe it's very easy but I don't find anywhere a solution.

I need to know if a free variable is unified with any kind of value,
for example:

sillabo(Word,[H|T]) :- ....

sillabo(Word,[Last,Current | T]) :- ...


I want it to go to the second goal only if the actual list has already
a Last element that's unified with a value.
I'm sorry for my english and my prolog dictionary...
I'll try to be clearer if you don't understand my problem.



.



Relevant Pages

  • Re: Getting status of a free variable.
    ... predicate nonvar/1, that is ... to invert clauses, that is: ... I'm sorry for my english and my prolog dictionary... ... I'll try to be clearer if you don't understand my problem. ...
    (comp.lang.prolog)
  • Re: How To Do Single Step debugging Under Sparc
    ... > Can You Make it more clearer? ... > i dont quite cache up with you,maybe a short piece of C code would ... The proc file system has a host of functions for debugging a process. ...
    (comp.unix.programmer)
  • A problem??
    ... i am new to prolog and have tried to solve the problem using ... my own code.the prooblem has a list as follows:- ... but the list of items appearing more than once is empty? ... I dont know ...
    (comp.lang.prolog)
  • Re: circle homeomorphism
    ... >>>Thank you for your indepth explanation, ... >>>i think i should have made it clearer, but i dont see how ... (That proof depended on the uniform convergence of that limit, ...
    (sci.math)
  • Re: user defined functions and inputs
    ... hey i dont think ive got my point across very well at all. ... then i want the program to recognise the variables that were involved with that method eg x,y,z ... i hope ive been a bit clearer ...
    (comp.soft-sys.matlab)

Loading