1.2.1. Creating a program
file.
To create a Prolog program, you must use an editor to create a file. There
are a number of editors available and you can use whatever you prefer. If you
have no preference, I suggest using Start | Programs |
Unsupported Utilities | Programmer’s File Editor. (Again, you
will find it convenient to create a shortcut on your desktop.)
Here is how
you do create a Prolog program.
- Double-click the Programmer’s File
Editor icon.
- Use the File menu of the resulting window to create a new, unnamed file.
- Enter the text of your file in the file window.
- You save your file by using the Save option from the File menu on the menu
bar at the top of the editor’s window, making sure you save it at the root
level of your M drive.
- Make sure that you give your Prolog files the extension
.pl .
- You can copy text in the usual manner by using
Copy and
Paste from the
Edit menu, or by using the key combinations
Ctrl-C and
Ctrl-V.
- Warning: Ctrl-C does NOT work to copy
text in the SWI-Prolog window; instead, select the text in the usual way and
then then click the mouse’s right button. To paste, use
Ctrl-V as usual.