James
BCD stores 2 decimal digits per byte (one in each nibble)
hence your 13 digit number fits in a 7 Byte BCD (with one nibble unused)
conversion would be rlatively simple assuming a byte (2 digit BCD) then
i := ord(b or 00FFH) + (10*ord(b shl 4))
hth
Neven
----- Original Message -----
From: James Sugrue <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Sent: Thursday, 18 January 2001 11:11
Subject: [DUG]: BCD et al
> Does any one know how to convert a BCD to an integer number. I have a file
> that stores a 13 digit number as a 7 Digit BCD. I have no idea how to
> convert BCD to Integer.
>
> Any help would be greatly appreciated.
>
> Cheers
>
> James
>
>
>
> CAUTION - This message may contain privileged and confidential information
intended only for the
> use of the addressee(s) named above. If you are not the intended
recipient of this message you are
> hereby notified that any use, dissemination, distribution or reproduction
of this message is prohibited.
> If you have received this message in error please notify Progressive
Enterprises Ltd. immediately via
> email at [EMAIL PROTECTED] Any views expressed in
this message are those of the
> individual sender and may not necessarily reflect the views of Progressive
Enterprises Ltd.
>
> This footnote also confirms that Progressive Enterprises Ltd. has swept
this email message for the
> presence of computer viruses. This does not guarantee this message is
virus free.
>
> --------------------------------------------------------------------------
-
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
>
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"