Maybe there's no technical reason it doesn't work... it's just set to not work 
to make it compatible with other pascal programs?

-----Original Message-----
From: fpc-pascal <fpc-pascal-boun...@lists.freepascal.org> On Behalf Of Mattias 
Gaertner via fpc-pascal
Sent: Monday, September 9, 2019 1:32 PM
To: fpc-pascal@lists.freepascal.org
Cc: Mattias Gaertner <nc-gaert...@netcologne.de>
Subject: Re: [fpc-pascal] Illegal counter variable?

On Mon, 9 Sep 2019 19:27:49 +0200
Bart <bartjun...@gmail.com> wrote:

> On Mon, Sep 9, 2019 at 4:54 PM Jonas Maebe <jo...@freepascal.org>
> wrote:
> 
> > "var i : longint = 0;" is internally handled using the same code 
> > path as "const i : longint = 0", and typed constants cannot be used 
> > as counter variables. This is indeed probably a bug.
> 
> D7 does not allow this for global variables: "for loop variables must 
> be simple local variables".
> In D7 you cannot initialize a local variable, so I cannot test that 
> scenario. Someone with a more recent Delphi should check if this 
> sysnatx is allowed.

Same in 10.3.

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

Reply via email to