optinal and mandatory sequence

Imported from previous forum

Hi,

As the spectification state a optional sequence can have a nullable length field. Then what is the difference between an optinal sequence with a NULL length field(0x80), an optinal sequence with the length field set to zero (0x81), and a mandatory sequnce with the length field having the value 0 (0x80)?

Regards,
Stefan Schneider

Hi Stefan,

any difference between the alternatives will be dependent on how you have specified that presence/absence should be interpreted.

As an example, let’s say you have a list of quoted prices.

length=NULL could be taken to mean “no changes”
length=0 could be “no quoted prices”
length>0 could be “‘length’ quoted prices”.

(in this case we have a default coding for a sequence. It is obviously only effective if you have reason to send a message when the sequence is unchanged)

or, alternatively:

length=NULL could be “no quoted prices”
length=0 could be “no changes”
length>0 could be “‘length’ changes”

(in this case we have a short form of removing all quotes)

For obvious reasons, a mandatory sequence doesn’t offer to express presence.

Best,
Rolf

Hi,

As the spectification state a optional sequence can have a nullable
length field. Then what is the difference between an optinal sequence
with a NULL length field(0x80), an optinal sequence with the length
field set to zero (0x81), and a mandatory sequnce with the length field
having the value 0 (0x80)?

Regards, Stefan Schneider

Thank you for the clarifications!

Hi Stefan,

any difference between the alternatives will be dependent on how you
have specified that presence/absence should be interpreted.

As an example, let’s say you have a list of quoted prices.

length=NULL could be taken to mean “no changes” length=0 could be “no
quoted prices”
length> could be “‘length’ quoted prices”.

(in this case we have a default coding for a sequence. It is obviously
only effective if you have reason to send a message when the sequence is
unchanged)

or, alternatively:

length=NULL could be “no quoted prices” length=0 could be “no changes”
length> could be “‘length’ changes”

(in this case we have a short form of removing all quotes)

For obvious reasons, a mandatory sequence doesn’t offer to
express presence.

Best, Rolf

Hi,

As the spectification state a optional sequence can have a nullable
length field. Then what is the difference between an optinal sequence
with a NULL length field(0x80), an optinal sequence with the length
field set to zero (0x81), and a mandatory sequnce with the length
field having the value 0 (0x80)?

Regards, Stefan Schneider