# Label functionality has a bug?

**URL:** <https://community.freefem.org/t/label-functionality-has-a-bug/1243>\
**Category:** General Discussion\
**Created:** [October 4, 2021, 10:45am UTC](https://community.freefem.org/t/label-functionality-has-a-bug/1243 "2021-10-04T10:45:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![distractor](https://avatars.discourse-cdn.com/v4/letter/d/57b2e6/32.png) [@distractor](https://community.freefem.org/u/distractor)\
**Post date:** [October 4, 2021, 10:45am UTC](https://community.freefem.org/t/label-functionality-has-a-bug/1243/1 "2021-10-04T10:45:02Z")

</div>

Imagine a cube

```auto
int[int] N = [20, 10, 5]; // Nodes per side.
real [int, int] B = [[0.0, 1.0], [0.0, 0.5], [0.0, 0.25]]; // Side lengths.
int [int, int] L = [[1, 2], [3, 4], [5, 6]]; // Labels.
mesh3 Th = Cube(N, B, L);
plot(Th, wait=1, cmm="Mesh");

```

which results in

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/freefem/original/1X/78945d2b53329050fdfc418deef95097b9a759c6.jpeg)

However

```auto
  for (int i = 0; i < Th.nv; i++){
      if (Th(i).label == 5){
          cout << " Th(" << i << ") : " << Th(i).x << " " << Th(i).y << " " << Th(i).z << " " << Th(i).label << endl;
        }
    }

```

produces **NO** output, as if there are no vertices with label 5. For labels 1–4 there are nodes, but 5–6 act as if there were no vertices with that labels which I find extremely weird.

Is this a bug or am I not getting how this works?

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [October 4, 2021, 4:48pm UTC](https://community.freefem.org/t/label-functionality-has-a-bug/1243/2 "2021-10-04T16:48:53Z")

</div>

Vertices have no label. Triangles (or edges in 2D) have a label.

---

<div class="post-metadata">

**Author:** ![distractor](https://avatars.discourse-cdn.com/v4/letter/d/57b2e6/32.png) [@distractor](https://community.freefem.org/u/distractor)\
**Post date:** [October 4, 2021, 5:49pm UTC](https://community.freefem.org/t/label-functionality-has-a-bug/1243/3 "2021-10-04T17:49:04Z")

</div>

Ok, that explains … Thanks!
