# Creating a lot of variables

**URL:** https://discourse.processing.org/t/creating-a-lot-of-variables/11052
**Category:** Beginners
**Created:** [May 9, 2019, 6:36am UTC](https://discourse.processing.org/t/creating-a-lot-of-variables/11052 "2019-05-09T06:36:53Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![crab](https://avatars.discourse-cdn.com/v4/letter/c/c5a1d2/32.png) [@crab](https://discourse.processing.org/u/crab)
#### Post date: [May 9, 2019, 6:36am UTC](https://discourse.processing.org/t/creating-a-lot-of-variables/11052/1 "2019-05-09T06:36:53Z")

</div>

Hi,  
I need to create a lot of variables with the same name, but with different numbers after the name, like that(obviously doesn’t work):

```auto
void setup(){
  for(int i = 10;i>=0;i--){
    int "var" + char(i);
  }
}

```

What can i use to accomplish this task?

---

<div class="post-metadata">

### Author: ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)
#### Post date: [May 9, 2019, 7:57am UTC](https://discourse.processing.org/t/creating-a-lot-of-variables/11052/2 "2019-05-09T07:57:25Z")

</div>

just not do it!  
how about using a array or a array list to keep that data?  
[https://processing.org/reference/Array.html](https://processing.org/reference/Array.html)  
[https://processing.org/reference/ArrayList.html](https://processing.org/reference/ArrayList.html)

---

<div class="post-metadata">

### Author: ![crab](https://avatars.discourse-cdn.com/v4/letter/c/c5a1d2/32.png) [@crab](https://discourse.processing.org/u/crab)
#### Post date: [May 9, 2019, 8:13am UTC](https://discourse.processing.org/t/creating-a-lot-of-variables/11052/3 "2019-05-09T08:13:38Z")

</div>

I actually forgot that there are such things as arrays, thanks!
