在序言中传回答案
我有这段代码运行完美..返回一个true..当跟踪值时没问题..但它没有返回答案..它结束时表现得很奇怪并且总是返回空列表..未实例化的变量..
createNewList(Capacity,RemainingNumbers,Bins,ExtendedBins).
createNewList(0,Bins,Bins,ExtendedBins,ExtendedBins).
createNewList(_,[],_,ExtendedBins,ExtendedBins).
createNewList(Capacity,[Element|Rest],Bins,Temp,ExtendedBins) :-
.
.
.
.
createNewList(Capacity,Rest,Bins,NewList,Result).
非常感谢帮助
i have this code than runs perfectly .. returns a true .. when tracing the values are ok .. but its not returning back the answer .. it acts strangely when it ends and always return empty list .. uninstantiated variable ..
createNewList(Capacity,RemainingNumbers,Bins,ExtendedBins).
createNewList(0,Bins,Bins,ExtendedBins,ExtendedBins).
createNewList(_,[],_,ExtendedBins,ExtendedBins).
createNewList(Capacity,[Element|Rest],Bins,Temp,ExtendedBins) :-
.
.
.
.
createNewList(Capacity,Rest,Bins,NewList,Result).
Greatly appreciate the help
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的,我发现了错误..我正在发送我想要将答案实例化为空列表的值..所以我总是得到空的答案..修复了..
ok ive found the error .. i was sending the value that i want to have the answer in instaniated as an empty list .. so i always got the answer back as empty .. fixed that ..