1
The usage of the forms library is relatively straightforward.
3
The interface has been designed as follows:
5
- All functions and procedures have kept their names.
6
- All types have a T appended in front of it.
7
If the forms manual speaks of a FL_OBJECT type, then the FPK port
9
(This is because of pascal's CaSe InSenSiTiViTy)
10
- Pointers to all objects have been defined as Ptype_of_object.
12
in FPK : PFL_OBJECT = ^TFL_OBJECT
13
- All 'int' declarations are 'longint' in fpkpascal.
15
Check out the 'demo' directory for examples.
17
Some fields of some structs have been renamed (fields as 'label' or 'type')
18
when they were in conflict with Pascal reserved words. Unfortunately this
19
has not been done in a consistent way. This will change in the future,
20
hopefully. As a rule of thumb : reserved pascal words got the prefix 'the',
21
so 'type' became 'thetype' etc.
23
When in doubt : consult the interface part of 'forms.pp'
25
How to compile an executable ?
28
The only thing that you must remember is to provide the linker with the
29
path to the X-libraries, and the form libraries. You can set this through
30
the '-k' option of -Fl option.
32
ppc386 -k-L/usr/X11/lib myprog.pp
34
ppc386 -Fl/usr/X11/lib myprog.pp
36
Will do the trick in most cases.
42
As of version 0.88 of xforms, fdesign supports pascal directly !
43
Using version 0.86, you can use the workaround described below:
45
You can convert existing design programs as follows:
47
fdesign [other options] -convert -ada -filter fd2pascal file.fd
49
fdesign [other options] -convert -pascal file.fd
51
or start a new design with
53
fdesign -ada -filter fd2pascal
57
This will emit pascal code. Use the following options
59
to emit procedure headers.
61
to emit a program instead of a unit
63
to use global variables instead of records.
67
Michael Van Canneyt (michael@tfdec1.fys.kuleuven.ac.be)