S swj Unregistered / Unconfirmed GUEST, unregistred user! 2001-05-23 #1 假设b=10:integer 怎样把b=10转换为byte型且要为bcd码00010000
H htw Unregistered / Unconfirmed GUEST, unregistred user! 2001-05-23 #2 概念不清, byte不是BCD码 to byte var ;aByte: Byte; ;b : integer; begin ;aByte := Byte(b); end; ;
S swj Unregistered / Unconfirmed GUEST, unregistred user! 2001-05-23 #3 sorry 那abyte:=byte(10) 则abyte为bcd 00010000 还是8421 ; 00001010 ;?
Z zhangkan Unregistered / Unconfirmed GUEST, unregistred user! 2001-05-23 #5 就等于10三,byte相当于short int.
C Chenlili Unregistered / Unconfirmed GUEST, unregistred user! 2001-05-23 #8 type ; TBcd ;= packed record ; ; Precision: Byte; ; ; ; ; { 1..64 } ; ; SignSpecialPlaces: Byte; { Sign:1, Special:1, Places:6 } ; ; Fraction: packed array [0..31] of Byte; { BCD Nibbles, 00..99 per Byte, high Nibble 1st } ; end;
type ; TBcd ;= packed record ; ; Precision: Byte; ; ; ; ; { 1..64 } ; ; SignSpecialPlaces: Byte; { Sign:1, Special:1, Places:6 } ; ; Fraction: packed array [0..31] of Byte; { BCD Nibbles, 00..99 per Byte, high Nibble 1st } ; end;