# Variables used in functions

**URL:** <https://forum.kirupa.com/t/variables-used-in-functions/327650>\
**Category:** Uncategorized\
**Created:** [March 16, 2012, 9:59pm UTC](https://forum.kirupa.com/t/variables-used-in-functions/327650 "2012-03-16T21:59:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![drpelz](https://avatars.discourse-cdn.com/v4/letter/d/c68b51/32.png) [@drpelz](https://forum.kirupa.com/u/drpelz)\
**Post date:** [March 16, 2012, 9:59pm UTC](https://forum.kirupa.com/t/variables-used-in-functions/327650/1 "2012-03-16T21:59:06Z")

</div>

I have a stupid question. I got this variable:

```auto

    var type:int;

```

and this function:

```auto

    private function test(type:int):void {
    }

```

when i call the function and throw in my variable type

```auto

    test(type));

```

is there a possibility that the compiler gets confused because my variable has the same name like the functions’s parameter (type = type)? i’m not certain about this topic. Normally I’d write my function’s parameter like this (if such a case occurs):

```auto

    private function test(_type:int):void

```

just to make sure the names do not exactly match (well I hope you know what I mean).
