On 09/09/2019 13:38, James Richters wrote:
Var
    I:Byte;
Begin
   I:=57;
   For I := I to 100 do
     Begin
        If I=87 then
           I:=95;
        Write(I,' ');
     End;
End.

Why not:

Var
    I:Byte;
Begin
   I:=57;
   For I := I to 100 do
     Begin
        If (I>86) And (I<95) then Continue;
        Write(I,' ');
     End;
End.

which is much easier to follow the logic.

cheers,

Martin.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to