문제

Existence error in user:nth1/3
! procedure user:nth1/3 does not exist

I have included module for lists : :- use_module(library(lists)). but still getting this error..

Can anyone please help?

도움이 되었습니까?

해결책

With SICStus 3, try using nth/3 instead of nth1/3 -- the latter doesn't exist in the lists library.

If your code actually calls user:nth1( , , ), then nth1/3 (or whatever else you've prefixed with user:) needs to be defined in the user module for user-defined code, which it seems is not the case in your environment given the error you've described. If this is the case, try again without the user: module prefix. If the predicate is a system predicate and is definitely loaded, the PROLOG system should find it automatically. If it can't, PROLOG will then assume it's something you should have defined in the user module, hence why it may be looking there.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top