Hi Paul,

(X) is a type constraints here, and it says that "y" MUST be of type "X"
only. Syntactically, this is equivalent to

Z ::= SEQUENCE {
       y       X
}

However, this kind of syntax (your syntax) is useful in case of PER. PER
always doesn't have length encoded, but while encoding open types, PER puts
a length wrapper also. So if you are using PER, then at the decoding side
you can easily find out the length of encoded open type value, without
knowing it's type.

Usually this type of construct is useful for security fields. Using length
wrapper you can easily find out the length of security data and leave this
data unwrapped and unprocessed in your application, and pass it to other
application or function, where this security data is used.

I hope this answer could be helpful for you.

Rajul

> I've put it off too long. Now it's time for me learn this ".&" stuff. Is
y,
> below, encoded in PER as an open type that contains an encoding of X? Is
> that all there is to it?
> Also, what syntactical role does the "(X)" play? Is
> this a constraint and otherwise y could be encoded as an open type of any
> type?
> X ::= SEQUENCE {
> a INTEGER, -- stuff...
> b BOOLEAN
> }
>
> Z ::= SEQUENCE {
> y TYPE-IDENTIFIER.&Type (X)
> }
>
> Paul Long
> ipDialog, Inc.
>
>
>



Reply via email to