FAQs for FPKPascal


This document answers frequently asked questions about FPK-Pascal.

  1. I tried to compile my tp7 code with it with your compiler, it seems that it can't recognized the OOP.

    The compiler supports OOP. Maybe there are some bugs look at Incompatibility List

  2. It can't recognized the comment style like this (* .......... *)

    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 {{ ... }}}
    

  3. How can I build unit?

    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.

  4. Will FPKPascal support TV (Turbo Vision) in the future?

    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

  5. How can I compile the system unit ?

    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)
    
  6. The compiler crashes with segment violation error.

    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.

  7. How does it compare to the GNU-Turbo Pascal alpha release ?

    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.

  8. What was is written in ?

    The compiler is written in Pascal and is able to compile the own sources. The sources are included.

  9. How long did it take you to write ?
       short history:
             6/93 project start
            10/93 first little programs work
             3/95 the compiler compiles the own sources
    
    But I'am working only may be 5 hours a week.

  10. Where can I get the compiler ?

    The compiler is available via FTP and WWW:

    http://www.brain.uni-freiburg.de/~klaus/pascal/fpk-pas
    ftp://mailserv.brain.uni-freiburg.de/gig2/pub/dos/fpk-pas

  11. How does function overloading work?

    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.
    

  12. How can I call C functions ?

    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 ];
    

  13. When did FPKPascal use DJGPP 2.0 ?

    I'am having some problems with DJGPP 2.0. And a second disavantage, in my opinion, is, that DJGPP 2.0 needs DPMI.

  14. How can I use the unit graph with FPKPascal ?

    Look at InitGraph


back to FPKPascal homepage

fnklaemp@cip.ft.uni-erlangen.de