Bancroft Scott wrote:
> 
> On Mon, 17 Sep 2001, Egon Andersen, Talura wrote:
> 
> > Bancroft Scott wrote:
> > >
> > > On Mon, 17 Sep 2001, Egon Andersen, Talura wrote:
> > >
> > > > I've been looking at the following construction.
> > > >
> > > > ---
> > > > alpha INTEGER { a (1) } ::= 3
> > > > beta INTEGER { alpha (7) } ::= alpha
> > > > ---
> > > >
> > > > What is the value of beta? 3 or 7? 'alpha' can be regarded as both a
> > > > DefinedValue and an identifier. Both types are defined with different
> > > > named values and different names for named values. I can't see that
> > > > any rule is violated. Nor any rules saying which of the two values is
> > > > assigned to 'beta' I'm specially looking at X.680 (1997 E) clause
> > > > 18.10 (including NOTE) and X.680 (1997 E)/Amd.2 (1999 E) clause F.4.5
> > >
> > > The answer is that beta is 7, same as you would get for
> > >
> > >         alpha INTEGER { a (1) } ::= 3
> > >         Foo ::= INTEGER { alpha (7) }
> > >         beta Foo ::= alpha
> > >
> > > We will clarify this in ASN.1:2002.
> > >
> >
> > How do you come to the conclusion that it is 7?
> > (Or should I interpret your last sentence as: 'it is actually not
> > defined in the 1997 version')
> 
> It is not clearly defined in the 1997 version where I would have expected
> to find it, or is not defined at all (I doubt it), else I would have
> quickly found.  I did check with the ASN.1 committee before my earlier
> response, so as to be sure that my conlusion is on target.

Bancroft's answer is right.
There is a general concept of (what I like to call) "environment layers" in
ASN.1, i.e., when you search for the definition of something, you first
search in the local environment (the named number list for your INTEGER type,
or the parameter list for parameterized types); if you don't find the
identifier in that list, you extend the environment and search in all the
definition of the modules (extended with the importation list).
Thanks to Egon for pointing this out, we'll improve this in ASN.1:2002 which
is nearing completion.
-- 
Olivier DUBUISSON (ITU-T ASN.1 Rapporteur)
france telecom R&D
     _                 DTL/MSV - 22307 Lannion Cedex - France
    ( )           tel: +33 2 96 05 38 50 - fax: +33 2 96 05 39 45
    /.\/               --------------------------------------
    \_/\               Site ASN.1 : http://asn1.elibel.tm.fr/

Reply via email to