Hi Mike,
x is uninitialized - hence, sizeof(x) will lead to an error.
However yes, you do not have to initialize variables - no matter if they
are of a restricted type.
Cheers, Ina
Prof. Dr.-Ing. Ina Schieferdecker, Head of Competence Center
Modeling and Testing url:
www.fokus.fraunhofer.de/go/motion
Fraunhofer FOKUS email:
This email address is being protected from spambots. You need JavaScript enabled to view it.
Kaiserin-Augusta-Allee 31 tel: ++49-30-3463-7241
D-10589 Berlin fax: ++49-30-3463-8241
>
Original Message
> From: active_ttcn3 : mts stf133 ttcn version 3 - active
> members only [
This email address is being protected from spambots. You need JavaScript enabled to view it.] On Behalf Of Michael Sperber
> Sent: Wednesday, December 17, 2008 1:34 PM
> To:
This email address is being protected from spambots. You need JavaScript enabled to view it.
> Subject: Record-of types vs. length restrictions
>
> I'm probably missing something in the standard once again ...
>
> Let's say I have a record-of type with a length restriction that has
> nonzero lower bound:
>
> type record length(5..10) of integer MyRecordOfType;
>
> Is it then legal to declare a variable without an initializing
> expression of that type, like so?
>
> MyRecordOfType x;
>
> If so, what is the initial value of the variable? (The relevant
> question is probably: what's the value of sizeof(x)?)
>
> --
> Regards,
> Mike
>