[top] [up] [next]

Creating a startup file


The Virtual Machine application must have a start-up file. In this file the prolog options, the name of the module to open, the first goal to execute, etc. are stored. A start-up file can be generated from within the development environment, the window for creating such a file is opened by pressing the menu items Options | Virtual machine start file....

    pl_img21.gif (5140 bytes)

If the checkbox labeled Virtual Machine window visible is checked the Virtual Machine window appears while a Prolog program is being executed, else the window is never shown. This can be useful for viewing system errors. The default extension of a start-up file is .TPS, which means Trinc-Prolog Startfile.

Location of the prolog start module

The filename of the startup module is an absolute path, one of the features of the Trinc-Prolog Virtual Machine is that during the loading of a .tps file it first searches the folder of the start-up file for a prolog module with the same name and if it finds such a file it then loads that file. This feature make it possible to install a .tps file and its prolog startup module at any location as long as they are in the same folder.
For instance: the file 'calc.txt' contains a prolog program and it is located at 'c:\temp', a startup file is created and in the startup file the filename 'c:\temp\calc.txt' is stored. The program along with the Virtual Machine is installed by a different user at 'c:\Program Files\calc\'. If the .tps file is used to start the Virtual Machine program it first searches for the file 'calc.txt' in the 'c:\Program Files\calc' folder, if there is a file with that name then that file is loaded and compiled. If there was no file with that name then the Virtual Machine checks if the file 'c:\temp\calc.txt' exists and if so loads and compiles that file.

[top] [up] [next]

 

info@trinc-prolog.com