> -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On > Behalf Of Olivier Dubuisson > Sent: Wednesday, July 23, 2003 16:50 > To: [EMAIL PROTECTED] > Subject: Re: [ASN.1] Unexpected error > > > Bruno.Konik wrote: > > My understanding of X681 9.8 quoted there: > > > > ----------------------------- > > A "VariableTypeValueFieldSpec" specifies that the field is a > > variable-type value field (see 3.4.21): > > VariableTypeValueFieldSpec ::= > > valuefieldreference > > FieldName > > ValueOptionalitySpec? > > > > The name of the field is "valuefieldreference". The > "FieldName" (see > > 9.14), which is relative to the class being specified, > shall be that > > of a type field; the type field which is either in the same > > information object as the value field, or is linked by the chain of > > object fields whose references appear in the "FieldName", > will contain > > the type of the value. (All link fields whose field > references appear > > in the "FieldName" shall be object > > fields.) The "ValueOptionalitySpec", if present, specifies > that the value > > may be omitted in an information object definition, or, in > the DEFAULT case, > > that omission produces the following "Value". The > "ValueOptionalitySpec" > > shall be such that: > > a) if the type field denoted by the "FieldName" has a > "TypeOptionalitySpec" > > of OPTIONAL, then the "ValueOptionalitySpec" shall also be > OPTIONAL; and > > b) if the "ValueOptionalitySpec" is "DEFAULT Value", then > the type field > > denoted by the "FieldName" shall have a > "TypeOptionalitySpec" of "DEFAULT > > Type", and "Value" shall be a value of that type. > > ----------------------------- > > > > is that in the case of : > > > > &ResultType DEFAULT NULL, > > &result-if-error &ResultType DEFAULT NULL, > > > > is the right writing according to b) above since NULL is > the value of > > NULL type. I don't see why adding "NULL" or " : NULL". > > I have the same reading of 9.8 and agree with your rationale.
Do you know if this feature (DEFAULT for variable-type-value fields) has been used in actual ASN.1 specifications? If yes, which notation has been used? Alessandro > -- > Olivier DUBUISSON > france telecom R&D > > DTL/TAL - 22307 Lannion Cedex - France > t: +33 2 96 05 38 50 - f: +33 2 96 05 39 45 - > http://asn1.elibel.tm.fr/ >