home *** CD-ROM | disk | FTP | other *** search
- PRODUCT : TURBO PROLOG NUMBER : 311
- VERSION : 3.2
- OS : PC-DOS
- DATE : October 9, 1986
-
- TITLE : MICROSOFT PASCAL INTERFACE
-
- The following describes how to call a Microsoft Pascal routine
- from Turbo Prolog.
-
- Interfacing Microsoft Pascal, version 3.2 with Turbo Prolog:
-
- STEP 1:
-
- object (.OBJ) file.
-
-
- global predicates
- double(integer, integer) - (i,o) language pascal
-
- goal
- double(1, X), write(X), nl.
-
-
- STEP 2:
-
- module mypas;
-
- procedure double_0(x : integer; vars y : integer);
- begin
- y := x + x;
- end;
- end.
-
- Note that all unbound variables must be passed as 'vars'
- parameters.
- This tells Microsoft Pascal to use 4-byte pointers instead of
- 2-byte
- pointers.
-
- Compile the Pascal program as follows:
-
- A> pas1 double
- A> pas2
-
- STEP 3:
-
- Link the Prolog and Pascal object modules as follows:
-
- A> link init+mypro+double+mypro.sym/DO,mixpro,,prolog
-
- The /DO option orders the segments and is required to link
- successfully
-
-