[fpc-devel] Re: [fpc-announce] Feature announcement: Type helpers
Gerhard Scholz
gs at g--s.de
Fri Feb 8 14:52:37 CET 2013
@Sven:
the problem is gone...
I made a new SVN run, and made a totally fresh compiler out of it. Now the
program compiles.
Maybe I didn't understand the syntax correctly: I didn't see how to get the
value inside the method?
example:
type
TLongIntHelper = type helper for LongInt
class procedure ShowValue; static;
end;
class procedure TLongIntHelper.Test;
begin
Writeln('Value=',self);
end;
var i : longint ;
begin
i:= 3 ;
.showvalue ;
end.
----- Original Message -----
From: Sven Barth
To: FPC developers' list
Sent: Friday, February 08, 2013 7:49 AM
Subject: Re: [fpc-devel] Re: [fpc-announce] Feature announcement: Type
helpers
Am 08.02.2013 07:22 schrieb "Paul Ishenin" <ip at kmiac.ru>:
>
> 08.02.2013 14:03, Sven Barth пишет:
>
>> > 0:25:46,51 G:\ob\syncdirs>ppc386 -vv -al -CioOrt -Cs6000000 -gclt
>> -Mobjfpc -O1 -OpPENTIUM -Fuu:\ -FuM:\u -FuC:\c\-u -FiC:\c\-u -Fuz:\-u
>> -Fiz:\-u -FuP:\gs\tp55\includes -Fuf:\-u -Fiu:\ -FiM:\u
>> -FiP:\gs\tp55\includes -Fif:\-u -FE. thelper
>> > thelper.pas(2,33) Error: Identifier not found "helper"
>> > thelper.pas(2,33) Error: Error in type definition
>> > thelper.pas(2,33) Error: Can't create unique type from this type
>> > thelper.pas(2,33) Fatal: Syntax error, ";" expected but "FOR" found
>> > Fatal: Compilation aborted
>> >
>> > The compiler is freshly generated from the SVN
>> >
>> > Does the compiler expect special options to invoke the record helper
>> feature?
>>
>> Did you add "{$mode objfpc}" to your program?
>
>
> Look at the compile string argument: -Mobjfpc
It's too early in the morning to look at command lines :)
@Gerhard: could you please check that the compiler is indeed from a current
SVN checkout?
Regards,
Sven
_______________________________________________
fpc-devel maillist - fpc-devel at lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel
More information about the fpc-devel
mailing list