TIMER causes confusion

May 20, 2008
10,568
78
Syracuse, NY, USA
I couldn't think of a better title for the post. I haven't got a clue what's happening below.

Code:
v:\> (do i=1 to 5 ( echo %i ))
1
2
3
4
5

v:\> timer (do i=1 to 5 ( echo %i ))
Timer 1 on: 12:54:17
6
6
6
6
6
Timer 1 off: 12:54:17  Elapsed: 0:00:00.003
It's the same without the extra parentheses.

Code:
v:\> do i=1 to 5 ( echo %i )
1
2
3
4
5

v:\> timer do i=1 to 5 ( echo %i )
Timer 1 on: 12:53:42
6
6
6
6
6
Timer 1 off: 12:53:42  Elapsed: 0:00:00.004
 
May 20, 2008
10,568
78
Syracuse, NY, USA
I get it. TIMER is dumb. It expands everything on its command line.

Code:
v:\> timer (do i=1 to 3 ( echo %%i ))
Timer 1 on: 13:10:36
1
2
3
Timer 1 off: 13:10:36  Elapsed: 0:00:00.003

v:\> timer (do i=1 to 3 ( echo %i ))
Timer 1 on: 13:11:00
4
4
4
Timer 1 off: 13:11:00  Elapsed: 0:00:00.003
 
Thread starter Similar threads Forum Replies Date
V Support 0
samintz Support 4
V Support 3
V Support 4
J Support 4