开发者

Prolog returns Out = _G431 when it's supposed to return a list of lists

createSchedule([[math109]], fall, Out).
[[cs485, cs485], [cs355, cs355, cs462, cs462, cs462], [cs345, cs345, cs352, cs352, cs352, cs362, cs362, cs362, cs396, cs396, cs396], [cs330, cs330, cs330], [cs255, cs255, cs255, cs268, cs268], [math114, cs245, cs245], [math112, cs145, cs146], [math109]]

Out = _G431

this is what prolog returns and the list of lists is shown by using write(Out) in prolog.

Any ideas why开发者_如何转开发 it is showing this? Thanks


It seems the variable Out in the goal createSchedule([[math109]], fall, Out) may not have been unified to anything in the execution of the goal (or, it was unified with variables only).

I suggest you check where the last variable in createSchedule/3 (i.e., Out) should be bound in your code, and if this doesn't help, you could execute ?- trace, createSchedule([[math109]], fall, Out). and step through your code to see where it failed to behave as expected.

Without more information (e.g., the predicate definition), we can't help you any further.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜