[fpc-pascal] fcl-passrc example program, and a couple of bugreports
Sven Barth
pascaldragon at googlemail.com
Tue Apr 27 19:14:39 CEST 2010
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:
=== 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
More information about the fpc-pascal
mailing list