![]() |
![]() |
![]() |
![]() |
![]() |
Parameter Lists in TTCN
The following TTCN objects may be parameterized:
Formal Parameter Lists
In all cases parameterization is indicated by the relevant TTCN object identifier being followed by a formal parameter list. For example:
Actual Parameter Lists
Parameterized objects are invoked with an actual parameter list. For example:
- the number of parameters in the actual parameter list must be the same as the number of parameters in the formal parameter list;
- the actual values in the actual parameter list must be of a type that is compatible with the type of the corresponding formal parameters;
- all actual parameters shall be bound at the time of invocation of the test suite operation, test step, constraint or default;
- all actual parameters must resolve to specific values.
Call-By-Reference
The TTCN uses textual substitution to define the passing of actual parameters in test steps and defaults. An alternative, and more intuitive, way of describing parameter passing for test steps and defaults and yet retain TTCN semantics is to describe the mechanism in terms of call-by-reference, in which the called routine (test step or default) has access to the original argument, not a local copy. All operations that effect that argument have the same effect on the original.
Call-By-Value
The TTCN standard states that neither user defined operations nor constraints may change the values of any actual parameters that are passed to them, i.e. they shall have no side-effects. Thus, for user defined operations and constraints it is more suitable to describe the parameter passing mechanism in terms of call-by-value in which the called routine (user defined operations or constraint) works on a local copy of the argument. The original argument is not affected by the routine.
http://www.ibm.com/rational |
![]() |
![]() |
![]() |
![]() |