Imported from previous forum
Hi experts,
Byte on the stream is 11101100, previous value is 30, what will be the decoded value?
I interpreted it as 107+30 = 137, exchange interpreted it as -20+30 = 10. It is the matter of decoding an unsigned integer or decoding an signed integer.
if exchange is correct, does it imply the general rule that integer decoding is always signed integer decoding no matter what is defined in template tag? Or it is only apply to delta operator?
Please advise
Many thanks
Fengwei
Hi Fengwei,
please refer to the specification, section “10.7.1 Integer Delta”
“The delta value is represented as a Signed Integer.
A nullable integer delta is represented by a nullable Signed Integer.”
This means that 11101100 (sign extended to 0xffffffec) should be interpreted as -20
Hope this helps.
/Rolf
Hi experts,
Byte on the stream is 11101100, previous value is 30, what will be the decoded value?
I interpreted it as 107+30 = 137, exchange interpreted it as -20+30 = 10. It is the matter of decoding an unsigned integer or decoding an signed integer.
if exchange is correct, does it imply the general rule that integer decoding is always signed integer decoding no matter what is defined in template tag? Or it is only apply to delta operator?
Please advise
Many thanks
Fengwei
Hi Rolf,
Thanks a lot.
Rgds
Fengwei
Hi Fengwei,
please refer to the specification, section “10.7.1 Integer Delta”
“The delta value is represented as a Signed Integer.
A nullable integer delta is represented by a nullable Signed Integer.”This means that 11101100 (sign extended to 0xffffffec) should be interpreted as -20
Hope this helps.
/RolfHi experts,
Byte on the stream is 11101100, previous value is 30, what will be the decoded value?
I interpreted it as 107+30 = 137, exchange interpreted it as -20+30 = 10. It is the matter of decoding an unsigned integer or decoding an signed integer.
if exchange is correct, does it imply the general rule that integer decoding is always signed integer decoding no matter what is defined in template tag? Or it is only apply to delta operator?
Please advise
Many thanks
Fengwei