[fpc-pascal] lul.pas does not compile with fpc 2.2.0
Mattias Gaertner
nc-gaertnma at netcologne.de
Sat Feb 9 21:15:58 CET 2008
On Sat, 9 Feb 2008 22:04:33 +0200
ik <idokan at gmail.com> wrote:
> 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
No.
He probably forgot to enable Delphi mode.
See here
http://wiki.lazarus.freepascal.org/Code_Conversion_Guide
and especially here:
http://wiki.lazarus.freepascal.org/Code_Conversion_Guide#Selecting_the_right_compiler_mode
Mattias
>
> 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
> >
>
>
>
More information about the fpc-pascal
mailing list