opensubscriber
   Find in this group all groups
 
Unknown more information…

f : fpc-pascal@lists.freepascal.org 23 December 2011 • 5:15AM -0500

Re: [fpc-pascal] Forward declarations
by Mark Morgan Lloyd

REPLY TO AUTHOR
 
REPLY TO GROUP




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]
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@list...
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.