Paul Thorpe wrote:

Hi Martin,

Why not use

X ::= SEQUENCE {
 padding BIT STRING (SIZE(10))('0000000000'B),
 a        A
}

where A is the choice below with two items? If you add more items to the
choice, you reduce the size of the size of the bit string correspondingly.



Of course that's the way to go, put padding in front (instead like I did add stuff after to my choice).


I actually changed it a bit now (after the enlightenment).
So I do like this (and it seems to work after I compiled it :-).

X ::= SEQUENCE {
 padd1   NULL OPTIONAL,
 a        A
}

(Actually I had choices up to 642 so I only need 1 padding bit)

thanks/Martin
_______________________________________________
ASN1 mailing list
[email protected]
http://lists.asn1.org/mailman/listinfo/asn1

Reply via email to