[fpc-pascal] Illegal counter variable?

Martin Wynne martin at templot.com
Wed Sep 11 14:49:17 CEST 2019


> If step is wanted, it's easy enough:
> 
> For n:=a to b Do
>    Begin
>      if n Mod step <> 0 then Continue;
>      ...
> 

p.s. make that

   if (n-a) Mod step <> 0 then Continue;

for cases where a is not a multiple of step.

Martin.



More information about the fpc-pascal mailing list