<?xml version="1.0" encoding="UTF-8"?>
<test id="wmlscript/core/functions/return/2" class="A" scope="wmlscript" testtype="application" type="auto" source="wmls11#6.4.3" device="both">
  <assertion>A function can be called as a statement.
</assertion>
  <specnote>New for June 2000.  A value returned by a function does not have to be assigned to a variable or used by the calling function as part of a conditional statement or a subsequent function call.</specnote>
  <results>
    <result>
      <name>test</name>
      <value>pass</value>
    </result>
  </results>
  <method>
    <![CDATA[<card newcontext="true" id="main">
<onevent type="onenterforward">
<go href="<script1>#main('test','card1')"/>
</onevent>
<auto_failed>
</card>]]>
  </method>
  <cards>
    <card id="1">
      <![CDATA[<card id="card1">
<onevent type="onenterforward">
<go href="<resulturl>">
<postfield name="test" value="$test"/>
<sessionvars>
</go>
</onevent>
<auto_failed>
</card>
]]>
    </card>
  </cards>
  <scripts>
    <script id="1">
      <![CDATA[extern function main(myvar,next) {
	var result = 'fail';

	test1 ();
	test2 ();
	test3 ();

	result = "pass";

	WMLBrowser.setVar(myvar, result);
	WMLBrowser.go('#' + next);
	return 1;
}

function test1 ()
{

    return 10;

}

function test2 ()
{

    return "test";

}

function test3 ()
{

}

]]>
    </script>
  </scripts>
</test>

