Recent

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

Bart

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

ASBzone

  • Hero Member
  • *****
  • Posts: 543
  • Automation leads to relaxation...
    • Free Console Utilities for Windows 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.0.11 r64280 / FPC v3.2.1-r48417 (via FpcUpDeluxe) -- Windows 64-bit install w/32-bit cross-compile
Primary System: Windows 10 Pro x64, Version 2009 (Build 19042)
Other Systems: Windows 10 Pro x64, Version 2009 (Build 19042) or greater

 

TinyPortal © 2005-2018