# \[F\] $loop() fails after %loop(,1)

**URL:** https://community.mp3tag.de/t/f-loop-fails-after-loop-1/9010
**Category:** Fixed Bugs
**Tags:** bug-fixed
**Created:** [September 22, 2009, 8:41pm UTC](https://community.mp3tag.de/t/f-loop-fails-after-loop-1/9010 "2009-09-22T20:41:51Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![chrisjj](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/c/a698b9/32.png) [@chrisjj](https://community.mp3tag.de/u/chrisjj)
#### Post date: [September 22, 2009, 8:41pm UTC](https://community.mp3tag.de/t/f-loop-fails-after-loop-1/9010/1 "2009-09-22T20:41:51Z")

</div>

1 See file:///C:/Program%20Files/Mp3tag/help/options\_export.html#syntax says

> [@](#):
>
> $loop(%fieldname%) starts a new loop. The loop data is sorted by the fieldname.  
> $loopend() ends a loop.  
> If you want to limit the loop output to a certain number of entries, simply use $loop(%fieldname%,num). This is useful to eliminate duplicate records (num=1).

2 Select five tracks  
3 Export with this config

```
$loop(%dummy%)1 $loopend(), $loop(%dummy%,1)2 $loopend(), $loop(%dummy%)3 $loopend()

```

Expected : 1 1 1 1 1 , 2 , 3 3 3 3 3  
Observed: 1 1 1 1 1 , 2 , 3

Anyone know a workaround?

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [September 25, 2009, 10:33am UTC](https://community.mp3tag.de/t/f-loop-fails-after-loop-1/9010/2 "2009-09-25T10:33:32Z")

</div>

Good catch, thanks for reporting!

I'll fix it to the next release.

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [September 25, 2009, 1:19pm UTC](https://community.mp3tag.de/t/f-loop-fails-after-loop-1/9010/3 "2009-09-25T13:19:55Z")

</div>

This is now fixed with [Mp3tag v2.44a](http://developer.mp3tag.de).

---

<div class="post-metadata">

### Author: ![Florian](https://community.mp3tag.de/user_avatar/community.mp3tag.de/florian/32/5759_2.png) [@Florian](https://community.mp3tag.de/u/Florian)
#### Post date: [December 28, 2018, 2:02pm UTC](https://community.mp3tag.de/t/f-loop-fails-after-loop-1/9010/4 "2018-12-28T14:02:54Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
