Recent

Author Topic: About For loop variable in nested scopes  (Read 660 times)

Bart

  • Hero Member
  • *****
  • Posts: 3435
    • Bart en Mariska's Webstek
Re: About For loop variable in nested scopes
« Reply #15 on: May 02, 2019, 10:51:21 pm »
Well, too often there is simply no difference :). But hey, if users don't think it is important enough to report, then probably it is not important enough to fix either.

Filed as issue #35476.

ETA: and fixed.

Bart
« Last Edit: May 02, 2019, 11:48:10 pm by Bart »

lucamar

  • Hero Member
  • *****
  • Posts: 1544
Re: About For loop variable in nested scopes
« Reply #16 on: May 02, 2019, 11:48:52 pm »
Filed as issue #35476.

Thanks, Bart. Beat me to it while I was suppering :)
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 1.8.4 & 2.0.2 w/FPC 3.0.4 on:
(K|L)Ubuntu 12..16, Windows XP SP3, various DOSes.

ASBzone

  • Full Member
  • ***
  • Posts: 225
  • Automation leads to relaxation...
    • BrainWaveCC Utilities
Re: About For loop variable in nested scopes
« Reply #17 on: May 03, 2019, 12:51:44 am »
@ASBzone: global variable can not be used to iterate any for loop, if such a loop is inside subroutine:

Got it.  Thanks
-ASB: https://www.BrainWaveCC.com

Lazarus v2.0.3 r61198 / FPC v3.2.0-beta-r42126 (via FpcUpDeluxe) -- Windows 64-bit install w/32-bit cross-compile
Primary System: Windows 10 Pro x64, Version 1903 (Build 18362.116)
Other Systems: Windows 10 Pro x64, Version 1809 or greater