# Code simplification

**URL:** <https://discourse.processing.org/t/code-simplification/2444>\
**Category:** Processing\
**Created:** [August 7, 2018, 11:32am UTC](https://discourse.processing.org/t/code-simplification/2444 "2018-08-07T11:32:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hugo](https://avatars.discourse-cdn.com/v4/letter/h/b38774/32.png) [@hugo](https://discourse.processing.org/u/hugo)\
**Post date:** [August 7, 2018, 11:32am UTC](https://discourse.processing.org/t/code-simplification/2444/1 "2018-08-07T11:32:08Z")

</div>

Hello ,  
Is there a way to simplify the next line :  
int A2=1,A3=1,A4=1,A5=1,A6=1;  
thank you.

---

<div class="post-metadata">

**Author:** ![MxFxM](https://avatars.discourse-cdn.com/v4/letter/m/71e660/32.png) [@MxFxM](https://discourse.processing.org/u/MxFxM)\
**Post date:** [August 7, 2018, 11:44am UTC](https://discourse.processing.org/t/code-simplification/2444/2 "2018-08-07T11:44:52Z")

</div>

Depending on how you are going to use it:

- Use an array instead of different names for easier access
- Write them not in one line but underneath each other for better visibility + it doesn’t matter, wont be slower

---

<div class="post-metadata">

**Author:** ![EnhancedLoop7](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/enhancedloop7/32/1040_2.png) [@EnhancedLoop7](https://discourse.processing.org/u/EnhancedLoop7)\
**Post date:** [August 7, 2018, 3:12pm UTC](https://discourse.processing.org/t/code-simplification/2444/3 "2018-08-07T15:12:54Z")

</div>

As @MxFxM said, you can use an array as such:

`int[] numberArray = {1,1,1,1,1};`

Hope that clarifies it,

EnhancedLoop7

---

<div class="post-metadata">

**Author:** ![hugo](https://avatars.discourse-cdn.com/v4/letter/h/b38774/32.png) [@hugo](https://discourse.processing.org/u/hugo)\
**Post date:** [August 8, 2018, 8:18am UTC](https://discourse.processing.org/t/code-simplification/2444/4 "2018-08-08T08:18:45Z")

</div>

Thank you for your answers i’ll see what i can do.
