breaking big-number FOR /L with GOTO does not work?

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
npocmaka_
Posts: 480
Joined: 24 Jun 2013 17:10
Location: Bulgaria
Contact:

breaking big-number FOR /L with GOTO does not work?

#1 Post by npocmaka_ » 17 Jul 2014 06:30

Any idea why this happens?


Code: Select all

@echo off

for /l %%a in (1;1;10000) do (

   goto :break_for1
   
)
:break_for1
echo this was fast


for /l %%a in (1;1;2147483) do (

   goto :break_for2
   
)
:break_for2
echo this was slow


for /l %%a in (1;1;2147483647) do (

   goto :break_for3
   
)
:break_for3
echo this never ends



I've take a glance on this thread -> viewtopic.php?f=3&t=3758 but nothing like that is mentioned there.

(This is tested on Win 8x64 . May be it's worth to test a big text file processing with FOR /F too ?)

Aacini
Expert
Posts: 1587
Joined: 06 Dec 2011 22:15
Location: México City, México

Re: breaking big-number FOR /L with GOTO does not work?

#2 Post by Aacini » 17 Jul 2014 06:45

This problem was extensively discussed at this thread, and the solution I like most is here.

Antonio

Post Reply