![]() Whether or not I have been understanding it correctly or not remains to be seen, but even if I have been understanding it correctly, I'm still lost as to how I load my own projects. This bit makes sense to me, I think, how I get to my loader file, doesn't. So to save a huge manual load each time I would have a loader file that will load the other components of my project (which is what the examples for Logtalk do). Which I understand like so: logtalk_load(file). I've tried to find a tutorial but it is very difficult to find much of anything for Logtalk, the most I have found is this documentation on loading from within your project: logtalk_load/1. I've used an installer for windows to install logtalk and I know that it is working as I've been looking at the examples that it comes with. ![]() Now let me be clear on something, I can use the "consult('.')." command just fine, I can even use "consult" to open my projects, however if I do this the logtalk console doesn't seem to be using any of the logtalk extensions and so is just vanilla prolog. There was another post that was asking how to do this with SWI as well, but it didn't have any replies and didn't look like any effort had been made to figure the problem out. I also thought that this can't possibly be the practical route to load user created projects in Logtalk. I took a look at the library and couldn't figure out what was going on. and yet it is consulted like so: | ?- logtalk_load(hello_world(loader)).įirst thing I thought was "that is a functor", looking at what it was doing using trace, I found that it was being called from the library and was being told how to get to the examples folder, where it then opened the "hello_world" folder and then the "loader" file. The file called hello_world, is located in the examples folder of the Logtalk files. I'll take the "hello_world" example as the point of discussion. What I don't understand though is what is actually going on when logtalk is loading a file, and how I can load my own projects. I have taken a look at the examples that Logtalk comes with in order to understand the code itself, and in doing so I've been able to load them and execute them perfectly. I'm not sure how to actually consult my own projects using Logtalk. In this case I'm using Prolog SWI, and I've run into a little snag. ![]() So this week consisted of me installing Logtalk, one of the extensions for Prolog. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |