Dear list members,
it seems to be nowhere specified how the order of definitions/declarations
must be inside component type definitions.
In clause 5.3 of ETSI ES 201 873-1 V4.2.1 (2010-07) one can find only following
text:
Declarations in the module definitions part may be made in any order.
However inside the module control part, test case definitions, functions,
altsteps, and statement blocks, all required declarations must be given
beforehand. This means in particular, local variables, local timers, and local
constants shall never be used before they are declared. The only exception to
this rule are labels. Forward references to a label may be used in goto
statements before the label occurs (see clause 19.8).
In my opinion the text should be altered into:
However inside the module control part, test case definitions, functions,
altsteps, statement blocks and component type definitions, all required
declarations must be given beforehand.
//Such that
type component C1 {
const integer myConst := 12;
var integer myInt1 := myInt2; // -> error
var integer myInt2 := myConst; // -> ok }
What is your opinion about this?
BR.,
Uwe Truetsch