root/tags/lgt2180/QUICK_START

Revision 1109, 3.6 KB (checked in by pmoura, 4 years ago)

Updated references to release number to 2.18.0.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1=================================================================
2Logtalk - Object oriented extension to Prolog
3Release 2.18.0
4
5Copyright (c) 1998-2004 Paulo Moura.  All Rights Reserved.
6=================================================================
7
8
9Quick start
10===========
11
12
131. Open the manuals/index.html file with a web browser.
14
152. Select the Tutorial link. This will provide you with a basic understanding
16of the main Logtalk concepts.
17
183. Go back to the index.html file and select the User Manual link and then
19the Installing and running Logtalk links. This will provide you with a basic
20understanding of how to start Logtalk and compile and load Logtalk code.
21
22
23Assuming that Logtalk supports your Prolog compiler:
24
251. Read the NOTES file in the configs sub-directory to check if any patch
26or workaround is needed for your compiler.
27
282. Start your Prolog compiler.
29
303. Change the current working directory of your Prolog session to the Logtalk
31installation directory. If you don't know which predicate to use, check the
32configs/NOTES file or your Prolog reference manual.
33
344. Compile and load the config file for your Prolog compiler.
35
365. Compile and load the Logtalk pre-processor/runtime found in the compiler
37sub-directory.
38
39Note that both the configuration files and the compiler/preprocessor files
40are Prolog files. The predicate called to load these files depends on your
41Prolog compiler (consult your Prolog compiler documentation or take a look
42at the definition of the predicate $lgt_load_prolog_code/1 in the config
43file. For most command-line compilers, you could type at the Prolog prompt
44something like:
45
46    | ?- ['configs/foo.config', 'compiler/logtalk.pl'].
47
48Replace the file name foo.config with the appropriated config file name for
49your compiler.
50
51
52Now you may try some of the included examples:
53
541. Change the working directory of your Prolog compiler to the library
55directory and then type at the Prolog prompt the following query:
56
57    | ?- logtalk_load(all_loader).
58
59This will load all the library entities that you will need in order to run
60the Logtalk examples.
61
622. Open the examples sub-directory. There you find several sub-directories
63with ready to run examples and a NOTES file containing general instructions
64and a brief description of each example. Select and open one of the examples
65sub-directory.
66
673. Read the example NOTES file. Some examples are dependent on other examples
68or on library objects (already loaded on step one). You may need to load
69additional files before running the chosen example.
70
714. Change the working directory of your Prolog compiler to the example
72directory.
73
745. Compile and load the loader file for the example as described in the NOTES
75and SCRIPT files. For most examples, the loader file is named loader.lgt.
76Therefore, you will need to type the query:
77
78    | ?- logtalk_load(loader).
79
80This will compile and load all the example files.
81
826. Open the example SCRIPT file, which contains sample queries that you
83may try by copying-and-pasting or draging-and-droping them on your Prolog
84interpreter top-level.
85
86
87Ready to start writing your own programs?
88
891. Read the User Manual sections on Programming in Logtalk and Running and
90debugging Logtalk programs.
91
922. Take a look at the wenv sub-directory. There you will find syntax
93configuration files for popular text editors that enable syntax coloring
94when editing Logtalk source files.
95
963. Create a sub-directory with a suitable name to hold all the files of your
97application.
98
994. Copy to this sub-directory a loader file from one of the example directories
100and modify it to load your own source files.
101
1025. Have fun!
Note: See TracBrowser for help on using the browser.