Dynamic variable
Posted: 11 Jun 2017 21:05
Dear Sir;
I would like to define a dynamic variable such as clauseX = clauseX(subclauseX,subclauseX).
Meanwhile, when I use this variable subclauseX1(phraseX) to pick the first result in a loop and I can't add the second result subclauseX2(phraseX,phraseX) and the third subclauseX3(phraseX,phraseX,phraseX) and so on
But the outputs of each cycle in the loop should not exceed the fifth cycle. A notice should be displayed and fail.
Regards;
AHMED NADY
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