[fpc-pascal] fcl-passrc example program, and a couple of bugreports

Michael Van Canneyt michael at freepascal.org
Tue Apr 27 19:23:13 CEST 2010



On Tue, 27 Apr 2010, Sven Barth wrote:

> Hi!
>
> On 27.04.2010 17:19, Michael Van Canneyt wrote:
>> 
>>> Also, program files are not parsed by fcl-passrc, it's limited to units
>>> for now. We would like to be able to eventually parse program files too.
>> 
>> I am all for it. It should not be hard to handle this; It's like parsing
>> an implementation block, with an extra flag that it should expect a
>> begin/end instead of initialization/finalization block.
>> 
>
> I don't know whether you know that or fcl-passrc supports that, but the 
> begin/end block is also possible in a unit:

It supports that, but for a program, the begin/end is mandatory, so
fcl-passrc needs to be notified. Like I said, it should be easily added.

Michael.
>
> === code begin ===
> unit unitbegin;
>
> interface
>
> function Foo: Integer;
>
> implementation
>
> function Foo: Integer;
> begin
>  Foo := 42;
> end;
>
> begin
>  Writeln(Foo);
> end.
> === code end ===
>
> This compiles without errors and the begin/end block is treated as an 
> initialization block.
>
> Regards,
> Sven
> _______________________________________________
> 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