Recent

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

Bart

  • Hero Member
  • *****
  • Posts: 3790
    • 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: 2857
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 2.0.8/FPC 3.0.4 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

ASBzone

  • Sr. Member
  • ****
  • Posts: 350
  • 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.9 r63081 / FPC v3.2.0-beta-r45317 (via FpcUpDeluxe) -- Windows 64-bit install w/32-bit cross-compile
Primary System: Windows 10 Pro x64, Version 1909 (Build 18363.778)
Other Systems: Windows 10 Pro x64, Version 1909 or greater

 

TinyPortal © 2005-2018