Previous Topic: LOCALAPPDATAPATHNext Topic: MapPath


var

var

Specifies that a variable is to be local to the immediate scope. This allows for recursion in scripts.

Usage:
var myLocalVariable;
Example:
function RecursionTest( strRecursionCount )
{
Print("enter RecursionTest = " + strRecursionCount );

     if (strRecursionCount != "xxxx")
     {
          var strIfScope = strRecursionCount + "x";

          RecursionTest( strIfScope );
     }
     else
     {
          return;
     }

     Print("leave RecursionTest = " + strRecursionCount );
}

function MyTestFunction()
{
     RecursionTest( "x" );
}