-
Notifications
You must be signed in to change notification settings - Fork 3
Code structure
Victor Mataré edited this page Dec 3, 2019
·
2 revisions
A golog++
program consists of a Basic Action Theory (BAT), functions/procedures and the main program.
Everything except the main program can be spread across multiple files and included in a main file in a way similar to C/C++ includes.
Includes are generally looked up in the same directory as the file containing the #include
statement.
So for example, one could have a file main.gpp
which looks like this:
#include "procedures.gpp"
{
win();
}
Where procedures.gpp
might look like this:
#include "bat.gpp"
procedure win() {
while (game_running())
produce();
}
And bat.gpp
would contain the definitions of a boolean function game_running()
and an action produce()
.