asn1: erroneous documented value

Bertil Karlsson bertil.karlsson@REDACTED
Tue Mar 18 12:00:34 CET 2003


It's correct that the documentation is false. Thank you for commenting 
this error!
The atom asn1_NOEXTVALUE has been removed since R6B, unfortunately we 
have missed to update the documentation. However, we think that the 
behaviour of the compiler is correct. The new documentation will be:
...
1.4.14 Notes about Extendability for SEQUENCE and SET

When a SEQUENCE or SET contains an extension marker and extension 
components like this:

SExt ::= SEQUENCE {
            a INTEGER,
            ...,
            b BOOLEAN }


It means that the type may get more components in newer versions of the 
ASN.1 spec. In this case it has got a new component b. Thus, incoming 
messages that will be decoded may have more or fever components than 
this one.

The component b will be treated as an original component when encoding a 
message. In this case, as it is not an optional element, it must be encoded.

During decoding the b field of the record will get the decoded value of 
the b component if present and otherwise the value asn1_NOVALUE.
...

/Bertil Karlsson

Vance Shipley wrote:
> The User's Guide for the asn1 module erroneously refers to asn1_NOEXTVALUE
> when the value actually used is asn1_NOVALUE.
> 
> Here is a diff from R9B-1:
> 
>  diff  ./lib/asn1-1.4.1/doc/html/asn1_ug.html ./lib/asn1-1.4.1/doc/html/asn1_ug.html.dist
> 814c814
> < <PRE>-record('SExt',{a,b=asn1_NOVALUE}).
> ---
> 
>><PRE>-record('SExt',{a,b=asn1_NOEXTVALUE}).
> 
> 818c818
> <         component if present and otherwise the value <CODE>asn1_NOVALUE</CODE>.
> ---
> 
>>        component if present and otherwise the value <CODE>asn1_NOEXTVALUE</CODE>.
> 
> 
> 
> 
> 	-Vance
> 
> Vance Shipley
> Motivity Telecom Inc.
> +1 519 240 3684
> vances@REDACTED


-- 
/ Bertil Karlsson




More information about the erlang-patches mailing list