# { means...?

**URL:** <https://forum.kirupa.com/t/means/8009>\
**Category:** Uncategorized\
**Created:** [November 12, 2002, 10:52am UTC](https://forum.kirupa.com/t/means/8009 "2002-11-12T10:52:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![blah\_de\_blah](https://avatars.discourse-cdn.com/v4/letter/b/a8b319/32.png) [@blah\_de\_blah](https://forum.kirupa.com/u/blah_de_blah)\
**Post date:** [November 12, 2002, 10:52am UTC](https://forum.kirupa.com/t/means/8009/1 "2002-11-12T10:52:58Z")

</div>

this is probably a real newbie question but in action scripting i always see people use { and } can someone tell me what those mean and when they should be used? thx very much 🙂

---

<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:** [November 12, 2002, 11:00am UTC](https://forum.kirupa.com/t/means/8009/2 "2002-11-12T11:00:15Z")

</div>

{} curly brackets like these are used to encapsulate a section of code. This usually occures when scripting a function and sometimes with other methods. Below is an example.

If (this==that){  
doThis();  
}

in this case I’ve used them with an ‘if’ statement. If the variable “this” is equal to “that”, then do whatever is inside the {}.

creating a function is done similarly.

function doThis(){  
myMovieClip.\_x++;  
}

in this case I’ve defined a function called ‘doThis’. It says, whenever the script encounters the funtion doThis, do whatever is inside the {} brackets.

It may make more sense if you see them like the following. In any case, you may contain the whole code on a single line and it will behave exactly the same as their multiline scripts above. below are the two above scripts writen on a single line.

If (this==that){doThis();}

function doThis(){myMovieClip.\_x++;}

Hope that helps.

---

<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:** [November 12, 2002, 11:14am UTC](https://forum.kirupa.com/t/means/8009/3 "2002-11-12T11:14:03Z")

</div>

cool i getit now thx very much
