Recent

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

Bart

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

ASBzone

  • Hero Member
  • *****
  • Posts: 678
  • Automation leads to relaxation...
    • Free Console Utilities for Windows (and a few for Linux) from BrainWaveCC
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.2.7-ada7a90186 / FPC v3.2.3-706-gaadb53e72c
(Windows 64-bit install w/Win32 and Linux/Arm cross-compiles via FpcUpDeluxe on both instances)

My Systems: Windows 10/11 Pro x64 (Current)

 

TinyPortal © 2005-2018