Hi again,
I wonder what the loop define is good for and how I would use it. It would be nice if someone could show me an example.
Thanks, Martin
Martin Kalbfuß wrote:
I wonder what the loop define is good for and how I would use it. It would be nice if someone could show me an example.
Just an example in the manual, I think (if that's what you are referring to), without a special meaning.
Regards,
Adriaan van Os
P.S. Contrary to that, the "Loop with test in the middle" statement, proposed by Dahl in 1972 (see http://en.wikipedia.org/wiki/Control_flow) is quite an interesting construct.
Martin Kalbfuà wrote:
I wonder what the loop define is good for and how I would use it. It would be nice if someone could show me an example.
Sorry, which loop define? The only thing I can find is in the manual:
{$define loop while True do} define loop to be while True do
Do you mean this? This is just meant to explain how user-defined macros work. (Which is not really a Pascal feature -- GPC inherited the preprocessor from the C compiler, which small syntactic adjustments.) This macro is not very useful itself (unless you want to often write endless loops, or often leave loops with "Break" or "goto", which both may not likely be the case ;-), and I generally wouldn't recommend to use macros very often.
Or do you mean something else?
Frank