I would like to define a dynamic variable such as clauseX = clauseX(subclauseX,subclauseX).
Code: Select all
subclauseX = subclauseX1(phraseX);
subclauseX2(phraseX,phraseX);
subclauseX3(phraseX,phraseX,phraseX);
subclauseX4(phraseX,phraseX,phraseX,phraseX);
subclauseX5(phraseX,phraseX,phraseX,phraseX,phraseX).
But the outputs of each cycle in the loop should not exceed the fifth cycle. A notice should be displayed and fail.
Code: Select all
test:(string*,string*,string*,string*,string*,phraseX,string*) determ(i,i,i,o,o,o,o).
Code: Select all
sent:(string*,string*,clauseX) determ(i,i,o).
Code: Select all
sent([],_,_):-!.
sent(_,[],_):-!.
sent(WLst,XLst,clauseX(Phrase)):-!,
test(WLst,XLst, WLst2, XLst2,Phrase).
sent(WLst2,XLst2,clauseX(Phrase)).
AHMED NADY