/***************************************************
 ** @author   STF 487
 ** @version  0.0.1
 ** @purpose  1:5.4.1, verify that out parameters can be read within parametrized content
 ** @verdict  pass accept, ttcn3verdict:pass
 ***************************************************/

// The following requirement is tested:
// For all these three sorts of parameter passing, the formal parameters can both be read and set
// (i.e. get new values being assigned) within the parametrized object.

module Sem_050401_top_level_002 {

	type component GeneralComp {
	}

	function f(out integer p_int) {
        log(p_int); // read access: UNINITIALIZED shall be printed as no assignment has been made
	}

	testcase TC_Sem_050401_top_level_002() runs on GeneralComp {
		var integer v_int := 10;
        f(v_int);
        if (v_int == 10) {
            setverdict(pass);
        } else {
            setverdict(fail);
        }
	}

	control{
		execute(TC_Sem_050401_top_level_002());
	}
}
