views:

30

answers:

1
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

+1  A: 

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.

sharky