On 22 Dec 2011, at 22:24, Timothy Groves wrote:
On 11-12-22 04:04 PM, Anton Shepelev wrote:
But are "mutually recursive procedures and functions" necessary?
Not at all.
I think they are only unnecessary in the same sense that having
procedures/functions as a whole are unnecessary, just li
On Fri, December 23, 2011 07:24, Jürgen Hestermann wrote:
> Timothy Groves schrieb:
>> 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.
>>
>
> Well, maybe this on
Timothy Groves schrieb:
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.
Well, maybe this one:
---
On 12/22/11 5:21 PM, Tony Whyman wrote:
> [explanation snipped] Why do you need a deeper explanation?
He is not asking for an explanation. (I think he knows what it is and
can see why it might be useful.)
He is asking for a compelling example as a use case that illustrates the
need for this langua
You could apply the same logic to the Pascal "label" statement. You can
(and should) always use a different construct and you could therefore
claim that the "label" statement is unnecessary because you cannot think
of a situation where there is no alternative - but it exists. And
sometimes it is c
Am Thursday 22 December 2011 22:04:34 schrieb Anton Shepelev:
>Fward decla-
>rations are necessary to allow mutually recur-
>sive procedures and functions that are not nest-
>ed.
Forward declarations are the only option in special situations:
If your program is huge and you only have this optio
On 11-12-22 04:04 PM, Anton Shepelev wrote:
But are "mutually recursive procedures and functions" necessary?
Not at all. But there is no other reason to use forward-declared
procedures that I can think of, and I need *something* to demonstrate
why you might need them.
On 11-12-22 04:15 PM, Mark Morgan Lloyd wrote:
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.
Absolutely. Because in both of those cases,
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 sequenc
Timothy Groves:
> 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.
Pascal User Manual and Report says:
Procecure (function) identifiers may be used be
On Thu, 22 Dec 2011 15:33:13 -0500
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.
Traverse a html tree. For example with div and p no
Am 22.12.2011 21:37, schrieb Rainer Stratmann:
> procedure fwproc; forward;
>
> procedure myprocedure;
> begin
> fwproc;
> end;
>
> procedure fwproc;
> begin
>
> end;
Bad example, in this case there is no need for implementing fwproc after
myprocedure.
g
Michael
__
Am Thursday 22 December 2011 21:33:13 schrieb Timothy Groves:
> 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.
> ___
>
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.
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists
14 matches
Mail list logo