[erlang-questions] ASN1 - DEFAULT clause problem

Bohuslav Svancara bsvancara@REDACTED
Mon Dec 10 11:37:37 CET 2012


Hello!

I have some problem with ASN1.

- I have this ASN1 definition in the Test.asn file:

Test DEFINITIONS IMPLICIT TAGS ::=

BEGIN
EXPORTS Test;

Test ::= SEQUENCE
{
   a INTEGER,
   b INTEGER DEFAULT 0
}

END

- I am using this comand:

erl -eval asn1ct:compile(\"Test.asn\").

It works fine.

But when I add a "DEFAULT 0" clause to the line "a INTEGER," so it looks
like this:

   a INTEGER DEFAULT 0,

then asn1ct fails:

1> asn1error:7:'Test':'Test'
{asn1,{duplicates_of_the_tags,[{'UNIVERSAL','INTEGER'}]}}
1>

Why please?

- Release of Erlang 5.9/OTP R15B
- Windows 7 Prof 64-bit

Sincerely,
Bob

----------------------------------------------------
Just for recap: Failing Test.asn looks like this:

Test DEFINITIONS IMPLICIT TAGS ::=

BEGIN
EXPORTS Test;

Test ::= SEQUENCE
{
   a INTEGER DEFAULT 0,
   b INTEGER DEFAULT 0
}

END
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20121210/4c973667/attachment.htm>


More information about the erlang-questions mailing list