in reply to Re^2: YASWI "Prolog System Error: Thread 1"
in thread YASWI "Prolog System Error: Thread 1"

So, it's not clear to me when the code before any routines gets executed. The error now is:
% /home/steve/Documents/i_prolog.pl compiled 0.00 sec, 32,784 bytes

This is not an error, just a message telling you the Prolog module i_prolog.pl has been loaded. If you get it several times it is probably because you are calling set_location_list() repeatedly.

Without seeing the full source code of your application I can only guess, and maybe there are some real bugs on the module annoying you, but it seems to me that the actual problem is that you don't got it yet. You should become more familiar with the module and Prolog and how they work together before trying to use them inside a complex application.

Replies are listed 'Best First'.
Re^4: YASWI "Prolog System Error: Thread 1"
by Steve_BZ (Chaplain) on Jan 21, 2010 at 11:57 UTC

    Hi Salva,

    It's true I am.

    Can I just clarify something? Whan I *first* call prolog, the prolog engine is loaded in a second thread, so I don't need to consult the file again. Once i_prolog.pl is loaded, it stays loaded and the engine stays running until the application ends? Is that right? I had been assuming that once I exited the module all the variables cleared themselves, because thgey were out of scope. I get the feeling that this is not true. So the only reason for calling consult @files again is if the files change for any reason, eg if I dynamically alter i_prolog.pl. Have I got that right?

    Thanks for your patient and expert help, it's truly invaluable.

    Regards

    Steve

      Once i_prolog.pl is loaded, it stays loaded and the engine stays running until the application ends?

      Yes, that's it. In this regard, Prolog is similar to Perl, once you load a module, the subs/predicates defined there remain defined until you shutdown the program.

        Hi Salva

        Ok thanks, it seems to work perfectly that way.

        Steve