# Difference between \[\] and ()

**URL:** <https://forum.kirupa.com/t/difference-between-and/2961>\
**Category:** flash\
**Created:** [February 26, 2002, 3:04pm UTC](https://forum.kirupa.com/t/difference-between-and/2961 "2002-02-26T15:04:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 26, 2002, 3:04pm UTC](https://forum.kirupa.com/t/difference-between-and/2961/1 "2002-02-26T15:04:08Z")

</div>

OK, this is a basic and for you guys probably boring question.\r\rBut what is the difference between [] and (). I used () in the random letters tutorial and it didn’t work. When i used [] it worked. I could not find any helpful info in the flash help. So can anybody on this forum help me?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 26, 2002, 3:52pm UTC](https://forum.kirupa.com/t/difference-between-and/2961/2 "2002-02-26T15:52:24Z")

</div>

[] are used for arrays, () are used for most everything else, including functions.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 26, 2002, 5:04pm UTC](https://forum.kirupa.com/t/difference-between-and/2961/3 "2002-02-26T17:04:50Z")

</div>

As Upu said, [] are used in arrays, when you want to get a certain element of that array. You can check the best of Kirupa forum for further information about arrays.\rThey are also used to evaluate an expression. But that’s a little bit complicated.\rOn the other hand, () are used in functions, to say that they have a certain number of arguments. For instance if you define the

```auto
 function distance (1stargument,2ndargument)

```

you’ll have to use it so :

```auto
 distance(15,65)

```

You can also find them when you define an array (see other forum).\r\rGood luck\rpom 0]
