[fpc-pascal] Forward declarations
Mark Morgan Lloyd
markMLl.fpc-pascal at telemetry.co.uk
Thu Dec 22 22:15:53 CET 2011
Timothy Groves wrote:
> Can anyone think of a situation in which you would *have* to use forward
> declared functions? I'm trying to come up with an example for such for
> my book, and I am drawing a blank.
Classic recursive-descent parser? An expression is a sequence of terms,
a term is a sequence of factors, one of the possibilities for a factor
is a parenthesised expression.
However, there's probably still a way round that in a unit, by moving
the first mention of one of those into the definition part. Or similarly
you might be able to avoid it by using object definitions.
--
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