On Fri, 20 Jun 2003, Ramaswamy wrote:
> Hi,
> According to the ASN.1 semantic model, 2 choice's are equivalent if
> after sorting of the fields in alphabetical order(The
> RootComponentList), they match one-to-one. But I tried the attached
> ASN spec on a syntax checker and it says that there is a type
> mismatch. Kindly advise. Bye.
This is a bug in the tool you are using, for no error should have been
reported for the assignment to choice2 in the following:
Choice1 ::= CHOICE
{
a INTEGER,
b REAL
}
Choice2 ::= CHOICE
{
b REAL,
a INTEGER
}
choice1 Choice1 ::= a:10
choice2 Choice2 ::= choice1
Note that, as stated in clause X.680 (2002) B.3.1, this affects only the
interpretation of the ASN.1 value notation:
------------------
"This annex is expected to be mainly of use to tool builders to ensure
that they interpret the language identically. It is present in order to
clearly specify what is legal ASN.1 and what is not, and to be able to
specify the precise value that any value reference name identifies, and
the precise set of values that any type or value set reference name
identifies. It is not intended to provide a definition of valid
transformations of ASN.1 notations for any purpose other than those stated
above."
------------------
-------------------------------------------------------------------------
Bancroft Scott Toll Free :1-888-OSS-ASN1
OSS Nokalva International:1-732-302-0750
[EMAIL PROTECTED] Tech Support :1-732-302-9669 x-1
1-732-302-9669 x-200 Fax :1-732-302-0023
http://www.oss.com