for n:=0 to

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

for n:=0 to

Carsten Bager
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);
------------------------

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: for n:=0 to

Jonas Maebe-2

On 16 aug 2006, at 14:02, Carsten Bager wrote:

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

Please submit a compilable sample which demonstrates the problem at  
http://www.freepascal.org/mantis (and mention it's for Arm/Linux)


Jonas
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal