This document answers frequently asked questions about FPK-Pascal.
The compiler supports OOP. Maybe there are some bugs look at Incompatibility List
It's true, the compiler don't support (* ... *).
It's not easy to do this. But the compiler supports nested comments like
{ This is a comment {{ ... }}}
It works like TP. The first keyword in the file must be UNIT (not case sensitive). The compiler will generate two files: XXX.PPU and XXX.O. The PPU file contains the interface informations for the compiler and the O-file the machine code (unix a.out styled object file). The main programs must contain a keyword USES.
A port of TV for FPKPascal will be done. It will be completly rewritten for 32 bit. For information have a look at FreeVision home page
For recompiling the system unit, change to the directory SOURCE/RTL/DOS Then type the following: PPC386 -Us -q- -OGx -Sgn system Now copy the new SYSTEM.PPU to BIN and SYSTEM.O to LIB The compiler switches do the following: -Us generate a system unit -q- print some statistics -OGx maximum optimations (in version 0.5.3 that's equal to -OGa) -Sgn short form of -Sg and -Sn -Sg allow GOTO and LABEL (I think not required for the system unit -Sn generate no exception handling code (I think not required, too)
If you have some problems with PPC386 (Segment violation errors occur), use the PPC compiler which is compiled with TP 7.0 and not with FPKPascal.
FPKPascal has nothing to do with GNU Pascal. But it's using the GNU AS and the DOS Extender of DJ Delorie from GNU C for DOS.
The compiler is written in Pascal and is able to compile the own sources. The sources are included.
short history: 6/93 project start 10/93 first little programs work 3/95 the compiler compiles the own sourcesBut I'am working only may be 5 hours a week.
The compiler is available via FTP and WWW:
function overloading is implemented, like in C++:
procedure a(i : integer); begin end; procedure a(s : string); begin end; begin a('asdfdasf"); a(1234); end.
C calling conventions are implemented: The compiler pushes the parameters from right to left, but the procedure must clear the stack. For calling the C function strcmp declare the following:
function _strcmp(s1 : pchar;s2 : pchar) : integer; [ SYSTEM ];or (since version 0.6.0):
function _strcmp(s1 : pchar;s2 : pchar) : integer; [ C ];
I'am having some problems with DJGPP 2.0. And a second disavantage, in my opinion, is, that DJGPP 2.0 needs DPMI.
Look at InitGraph
fnklaemp@cip.ft.uni-erlangen.de