[fpc-pascal] lul.pas does not compile with fpc 2.2.0

ik idokan at gmail.com
Sat Feb 9 21:04:33 CET 2008


It's simple, you declared a prototype of a class, so you do not need
to declare the entire structure of the class.

type
  Tpenis = class;

and that's it

Ido

On Feb 9, 2008 10:04 PM, Skybuck Flying <skybuck2000 at hotmail.com> wrote:
> Hi,
>
> The following simple and valid Delphi code does not compile with command:
>
> fpc lul.pas
>
> // *** Begin of Code ***
>
> unit lul;
>
> interface
>
> type
>  Tpenis = class
>  private
>
>  public
>
>  end;
>
> implementation
>
>
> end.
>
> // *** End of Code ***
>
> // *** Begin of Output ***
>
> <snip>fpc lul.pas
> Free Pascal Compiler version 2.2.0 [2007/09/09] for i386
> Copyright (c) 1993-2007 by Florian Klaempfl
> Target OS: Win32 for i386
> Compiling lul.pas
> lul.pas(10,2) Error: Identifier not found "class"
> lul.pas(10,2) Error: Error in type definition
> lul.pas(10,2) Fatal: Syntax error, ";" expected but "identifier PRIVATE"
> found
> Fatal: Compilation aborted
> Error: C:\Tools\Compilers\Free Pascal\2.2.0 Stable for
> Win32\bin\i386-Win32\ppc3
> 86.exe returned an error exitcode (normal if you did not specify a source
> file t
> o be compiled)
>
> // *** End of Output ***
>
> What's the problem ?
>
> Bye,
>   Skybuck.
>
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>



-- 
http://ik.homelinux.org/



More information about the fpc-pascal mailing list