[fpc-pascal] for n:=0 to

Carsten Bager carsten at beas.dk
Wed Aug 16 14:02:12 CEST 2006


I have a program like below, and if the control variable (nr) is defined 
as a byte/word it fails (the count goes from 1..14) But if I use an 
Integer as control variable it works.
Is this an error in the compiler?

If I use the Windows compiler (fpc) it works.

Carsten


--------------------------------------------------------------------------------
Free Pascal Compiler version 2.0.2 [2006/02/28] for arm
Copyright (c) 1993-2005 by Florian Klaempfl
Target OS: Linux for ARM
-----------------------------
 Function I2CLaesRecord(recNr:word16;Var dat:ByteArray16_typ):Boolean;
  Var
    ChipNr,nr:Byte;
    adr:word16;
    Label 1;
  Begin
....

               For nr:=0 to 14 do                    
                 dat[nr]:=I2C_LaesByte(True);
------------------------




More information about the fpc-pascal mailing list