# Function question

**URL:** <https://forum.kirupa.com/t/function-question/279053>\
**Category:** Uncategorized\
**Created:** [January 8, 2009, 9:32pm UTC](https://forum.kirupa.com/t/function-question/279053 "2009-01-08T21:32:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jim\_Carr](https://avatars.discourse-cdn.com/v4/letter/j/f4b2a3/32.png) [@Jim\_Carr](https://forum.kirupa.com/u/Jim_Carr)\
**Post date:** [January 8, 2009, 9:32pm UTC](https://forum.kirupa.com/t/function-question/279053/1 "2009-01-08T21:32:07Z")

</div>

I posted this earlier in the 3.0 Forum by mistake. I’m using 2.0. Sorry.

I’m just getting into this and can’t seem to make the simplest thing work! I’m trying to learn to define and call functions. Can someone please tell me what’s wrong with the following? I get no errors but it won’t trace the variable:

//define and fill a variable  
var name = “jim”

//define a function  
function traceTheName ():Void{  
trace (name);  
}

//call a function  
TraceTheName();
