[fpc-devel] Program too long ?

Mark Morgan Lloyd markMLl.fpc-devel at telemetry.co.uk
Thu Jan 14 19:03:22 CET 2016

wkitty42 at windstream.net wrote:

>> OTOH it's very easy to end up with enormous functions- or even an 
>> enormous main
>> block- if machine-generating source by e.g. macro expansion.
> now that you mention it, i do have a machine generated routine in one of 
> my apps... it was much easier to write code to generate all of the 
> individual case statements for the bit checking than to try to manually 
> write all of them and not typo anything...
> it started as tri-state for 5 sets of vars and was reduced to bi-state 
> for those 5 sets after a huge epiphany... we ended up with 1024 case 
> values to check instead of something over 18000...

I did it comparatively recently: machine-translate SNMP MIBs into 
Pascal. Now in practice individual functions/methods weren't that bad, 
but they easily could have been and having to break things up to suit an 
indeterminate limit would have been a right pain.

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-devel mailing list