Commit e0b01b08 authored by Matthias Simon's avatar Matthias Simon
Browse files

Section 16

parent 97e911b6
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -75,8 +75,8 @@ control {

### Formal parameters

A _formal parameter list_ specifies what a TTCN-3 language element is
parameterized and which parameters are accepted.
A _formal parameter list_ specifies how a TTCN-3 language element is
parameterized, which parameters are accepted and how parameters are accessed.

**Syntactical Description**

@@ -87,13 +87,13 @@ FormalPar ::= [ "in" | "out" | "inout" ] TypeExpr name {"[" integer "]"} ["..."]

**Semantic description**

The _formal parameter_ declaration adds a new parameter with given _name_ into
A _formal parameter_ declaration adds a new parameter with given _name_ into
the scope of the parameterized language element (see [uniqueness of
identifiers]).

A _formal parameter_ has a static type associated with it.
The type of the parameter shall be specified using a _[type expression]_
and shall not change during its [invocation].
and shall not change during its [lifetime].

A _formal parameter_ may be declared as array by using the [array short-hand
notation].
@@ -102,10 +102,10 @@ A _formal parameter_ shall not reference any formal parameters defined in the
same _formal parameter list_.

> NOTE: Referencing type-parameters, visible components (e.g. `mtc`, `self`, ...)
> or even variables of the runs-on component is permitted.
> or variables of the runs-on component is permitted.

A _formal parameter_ is either an _in-parameter_, indicated by the `in`
keyword, _inout-parameter_, indicated by the `inout` keyword, or
keyword, an _inout-parameter_, indicated by the `inout` keyword, or
_out-parameter_, indicated by the `out` keyword.

A _formal parameter_ without any of these keywords is considered an
@@ -126,8 +126,8 @@ distinct copy of a value, see following note)
Access to parameters passed by reference (i.e. `inout`) shall dereference implicitly.

A _formal parameter_ gets assigned its value when the parameterized TTCN-3
language element is passed an [actual parameter]; when a function is invoked,
when a template is instantiated, etc.
language element is passed an [actual parameter], i.e. when a function is invoked,
a template is instantiated, etc.

**Restrictions**