Actually, the original code used two VARs, not typed CONST. One VAR was 
initialized and one was not. I think this is a bug and should be fixed.


As Jonas already pointed out:

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




---- On Wed, 11 Sep 2019 12:40:57 -0400  <mailto:scoxb...@shaw.ca> wrote ----


Yes, off topic. The initial poster's code had the loop variable declared as an 
initialized constant. Not as a true variable. No FPC in hand, I can't test if 
setting 'assignable typed constants = true' would permit the use of an 
initialized typed constant or not. 
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to