Hi,
I think examples are not updated in description for page 165: 'sizeoftype' function:
numElements := sizeof(MyRecordOfVar1); // returns error as MyPDU1 is not constrained
numElements := sizeof(MyRecordOfVar2); // returns 8
numElements := sizeof(MyRecordOfVar3); // returns 10
Good idea with name 'sizeoftype'.
What about similar name 'sizeofvalue' for 'sizeof' function?
I feel there undesirable link to 'sizeof' function from C language while the behaviour was taken from TTCN-2 NUBER_OF_ELEMENTS and ASN.1 SIZE functions.
Last question. In previous definitions for 'sizeof' function the argument was defined as
sizeof(structured_type value) return integer
which definition is changed now to
sizeof(any_type value) return integer
but still there is discussion about counting of elements of structured types in 'sizeoftype'.
According BNF:
StructuredTypeDef ::= RecordDef |
UnionDef |
SetDef |
RecordOfDef |
SetOfDef |
EnumDef |
PortDef |
It may be also possible to determine number of elements of enumerated type.
Is it useful in any way?
BR,
Mariusz Kupiec