IBM
Contents Index Previous Next



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 following rules apply:

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
Contents Index Previous Next