$ cat junk.pl
test(ok).
$ prolog
Welcome to SWI-Prolog (Multi-threaded, 64 bits, Version 5.8.0)
Copyright (c) 1990-2009 University of Amsterdam.
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to redistribute it under certain conditions.
Please visit http://www.swi-prolog.org for details.
For help, use ?- help(Topic). or ?- apropos(Word).
?- [junk].
% junk compiled 0.00 sec, 24 bytes
true.
benim için çok iyi çalışıyor görünüyor. Tabii ki dosya ismim için bir atom kullanıyorum, değişken değil. (KB5, bir değişken değil, bir atomdur.) Önce ['KB5']
'u deneyin ve bunun işe yarayıp yaramadığını görün. Sonra [kb5]
'u deneyin ve bunun yardımcı olup olmadığını görün. Sonunda sağladığım gibi mutlak bir örnek deneyin ve bu şekilde yükleyip yükleyemeyeceğinizi görün.
Düzenlendi eklemek için:
$ cp junk.pl JUNK.pl
$ prolog
Welcome to SWI-Prolog (Multi-threaded, 64 bits, Version 5.8.0)
Copyright (c) 1990-2009 University of Amsterdam.
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to redistribute it under certain conditions.
Please visit http://www.swi-prolog.org for details.
For help, use ?- help(Topic). or ?- apropos(Word).
?- [JUNK].
ERROR: load_files/2: Arguments are not sufficiently instantiated
?- ['JUNK'].
% JUNK compiled 0.00 sec, 1,656 bytes
true.
Gerçekten atom sorunu gibi görünüyor. ['KB5']
kullanın ve hatayı muhtemelen gider. Diğer yöntem sağlanmış olsa da,