[fpc-pascal] run pascal programs as scripts

Mark Morgan Lloyd markMLl.fpc-pascal at telemetry.co.uk
Fri Mar 25 00:27:06 CET 2011

Mattias Gaertner wrote:
> On Thu, 24 Mar 2011 22:40:22 +0100
> Felipe Monteiro de Carvalho <felipemonteiro.carvalho at gmail.com> wrote:
>> On Thu, Mar 24, 2011 at 7:27 PM, Mark Morgan Lloyd
>> <markMLl.fpc-pascal at telemetry.co.uk> wrote:
>>> Would it be feasible to modify FPC so that it discarded everything preceding
>>> "program", "unit" etc?
>> Feasable, yes, but it is probably easier to make a pre-processor which
>> removes this line, simply.
> Commenting is better. Then the reported error line numbers are still
> valid.

Fpc treats # as // if (and only if) found as the first character of a 
file? Character position in this line won't be relevant since it's not 
going to be compilable source.

Also I notice that tcc (Tiny C Compiler) has a -run parameter which runs 
the compiled program after compilation.

With things as they stand, particularly in view of the requirement that 
the program is only recompiled if it's changed, I think the easiest way 
would be a wrapper: since that could be of adequate complexity and would 
have no restrictions on temporary files etc. it could excise/comment 
without restriction.

Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

More information about the fpc-pascal mailing list