Hi Jesús,
The example says there shall be no runtime error just because the type is empty (of course, the user shall be aware what value it can assign to an instance of the type - but this is true for all types).
But think about the following example:
type charstring Broader ("a", "ab", "abc", "abcd");
type Broader Narrower length (2..3);
In Narrower both the list and lenght restriction applies but is a valid use case.
BR, Gyorgy
________________________________
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 Jesús DomÃnguez Colino
Sent: Friday, 18 July, 2008 11:28 AM
To:
This email address is being protected from spambots. You need JavaScript enabled to view it.
Subject: Re: List restriction combined with length
Hi Giorgy,
Since the list is always more restrictive, I don't see the harm of not permitting the combination list + length. If you permit it, it will end up in runtime errors.
Best regards,
Jesús
György Réthy escribió:
Hi,
No it makes not, at least not in this form (it may make sense to add
an empty record for example as a placeholder for future protocol extensions - some encodings are able to skip the unknown elements added later).
The example says that the language do not want to constrain such use
artificially, even if it is generally considered to be useless.
BR, Gyorgy
________________________________
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 Jesús DomÃnguez Colino
Sent: Thursday, 17 July, 2008 3:16 PM
To:
This email address is being protected from spambots. You need JavaScript enabled to view it.
Subject: List restriction combined with length
Hi all,
Looking in the Core Language document (6.1.2.5.2 section) I
find this example:
type charstring MyCharStr10 ("gr", "xyz") length (4);
// contains no value (empty type).
Does it make any sense to have an empty type? Is there a
historical reason?
Best regards,
--
Jesús DomÃnguez Colino
Consultor Senior
Pº de la Castellana, 182 - 10ª planta
28046 - Madrid
Tel.: +34 913531564
Fax: +34 913596179
www.mtp.es <
www.mtp.es>
--
Jesús DomÃnguez Colino
Consultor Senior
Pº de la Castellana, 182 - 10ª planta
28046 - Madrid
Tel.: +34 913531564
Fax: +34 913596179
www.mtp.es <
www.mtp.es>