[fpc-pascal] Illegal counter variable?

Ralf Quint freedos.la at gmail.com
Wed Sep 11 07:06:05 CEST 2019


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... ;-)

The closest would be the FOR..IN variant, which works in Delphi (D2006? 
and later) and is AFAIK supported in FPC by now. But that would be 
iterating over a set, not increment an integer/cardinal variable in an 
increment other than 1...

Ralf



More information about the fpc-pascal mailing list