wkitt...@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]
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel