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

Skybuck Flying skybuck2000 at hotmail.com
Sat Feb 9 21:25:38 CET 2008


Nope.

More complex units did not compile as well.

Example of slightly more complex unit:

// *** begin of code ***
unit lul;

interface

type
 Tpenis = class
 private
  a : integer;
 public

 end;

implementation


end.

// *** end of code ***

Your reasoning doesn't make any sense anyway.

It's perfectly fine to declare a empty class like in my example.

Bye,
  Skybuck.

----- Original Message ----- 
From: "ik" <idokan at gmail.com>
To: "FPC-Pascal users discussions" <fpc-pascal at lists.freepascal.org>
Sent: Saturday, February 09, 2008 9:04 PM
Subject: Re: [fpc-pascal] lul.pas does not compile with fpc 2.2.0


> 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/
> _______________________________________________
> 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