[fpc-pascal] Illegal counter variable?

Sven Barth pascaldragon at googlemail.com
Wed Sep 11 14:17:48 CEST 2019


Christo Crause <christo.crause at gmail.com> schrieb am Mi., 11. Sep. 2019,
09:54:

>
> On Wed, Sep 11, 2019 at 7:06 AM Ralf Quint <freedos.la at gmail.com> wrote:
>
>> On 9/10/2019 4:26 PM, wkitty42 at windstream.net wrote:
>> > On 9/9/19 10:11 AM, James Richters wrote:
>> >> Pascal doesn't have things like step...
>> >
>> > hunh??? i don't think that's right but i'm just catching up after
>> > several 10+ hours days of $job...
>> >
>> > i know that i've written code in the past that did use something to
>> > step X numbers per run through the look and it did not involved
>> > manually incrementing the loop var...
>> >
>> >
>> I am not aware of any Pascal implementation that does have a STEP
>> parameter for FOR loops, and I am programming in Pascal at least as long
>> as you... ;-)
>>
>
> FPC documentation:
> https://www.freepascal.org/docs-html/ref/refsu58.html#x164-18600013.2.4 -
> at least FPC doesn't allow specifying an increment size.  Several other
> languages do allow specifying an increment (nice list of for loop
> constructs with specified increment in various languages:
> https://www.rosettacode.org/wiki/Loops/For_with_a_specified_step).  Modula-2
> or Oberon-2 code snippets could perhaps be mistaken for Pascal through the
> mists of time.
>

Well, we do have a patch for "for ... (down)to ... by" support:
https://bugs.freepascal.org/view.php?id=25549

Regards,
Sven

>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20190911/dffb068d/attachment.html>


More information about the fpc-pascal mailing list