# What are the enclosed numbers on the left hand side in the console when I "print"?

**URL:** <https://discourse.processing.org/t/what-are-the-enclosed-numbers-on-the-left-hand-side-in-the-console-when-i-print/12874>\
**Category:** Beginners\
**Created:** [July 21, 2019, 6:17pm UTC](https://discourse.processing.org/t/what-are-the-enclosed-numbers-on-the-left-hand-side-in-the-console-when-i-print/12874 "2019-07-21T18:17:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![femke.blanco](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/femke.blanco/32/3431_2.png) [@femke.blanco](https://discourse.processing.org/u/femke.blanco)\
**Post date:** [July 21, 2019, 6:17pm UTC](https://discourse.processing.org/t/what-are-the-enclosed-numbers-on-the-left-hand-side-in-the-console-when-i-print/12874/1 "2019-07-21T18:17:52Z")

</div>

What are the enclosed numbers on the left hand side in the console when I “print”?

![Nos](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/b/bf6f68ba0675bac7a2fb04922ce4d2241043c809.png)

[https://editor.p5js.org/femkeblanco/sketches/GFcm8qZgP](https://editor.p5js.org/femkeblanco/sketches/GFcm8qZgP)

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [July 22, 2019, 10:22pm UTC](https://discourse.processing.org/t/what-are-the-enclosed-numbers-on-the-left-hand-side-in-the-console-when-i-print/12874/3 "2019-07-22T22:22:27Z")

</div>

The console aggregates repeated print statements, giving you a summary rather than a list. It prints the aggregated statements about every half-second.

So, for example:

```auto
function setup() {
  createCanvas(400, 400);
  print("setup")
  frameRate(6);
}

function draw() {
  background(220);
  print("draw");
  if(frameCount==8) noLoop();
}

```

will call setup and then run for 8 frames, calling print with this:

> setup draw draw draw draw draw draw draw draw

```auto
   setup
3 draw
3 draw
2 draw

```

At 6fps, 3 frames is about half a second – so it is printing an update every 3 frames.

This is especially useful for summarizing print statements inside loops.

```auto
function setup() {
  createCanvas(400, 400);
  frameRate(6);
}

function draw() {
  background(220);
  for (i = 0; i < 10; i++) { 
    print("A")
  }
  for (i = 0; i < 100; i++) { 
    print("B")
  }
}

```

Note that the first B means that A isn’t repeating anymore. They need to be direct repetitions. If the output is non-repeating, no aggregation. With two different print statements, nothing is getting aggregated across frames. Instead, the console updates every half second with list including both blocks in each frame – ~2 blocks x 15 frames = 30 new entries.

If there are many individual statements that are different, almost nothing gets aggregated – although the console is still updating in bursts.

```auto
function setup() {
  createCanvas(400, 400);
}

function draw() {
  background(220);
  if(frameCount%2==0) print("2")
  if(frameCount%3==0) print("3")
  if(frameCount%4==0) print("4")
  if(frameCount%5==0) print("5")
  if(frameCount%6==0) print("6")
}

```
