Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating a 'packed' decimal for IBM mainframe upload
Message
From
21/09/1998 12:09:31
 
 
To
21/09/1998 12:02:49
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00139013
Message ID:
00139082
Views:
26
...snip...
>Another example: a value of -32767 would be represented as:
> |32|76|7B| or |32|76|7E| again assuming that a 3-byte field was wanted. By the way I feel a little unsure about the negative signs (not what you want to hear, I'm sure) but you can be certain that "F"is the standard for a positive number.
>
>hope this helps,
>
>Jim N

Jim, you are correct. 'F' is the standard for unsigned which is treated as postive. The standard for postive is 'C' and for negative is 'D'. This is what Gerry's code does where he adds '12' (hex C) or '13' (hex D) to the offset for a signed number, or '15' (hex F) for an unsigned number.

Rick
Rick Borup, MCSD

recursion (rE-kur'-shun) n.
  see recursion.
Previous
Reply
Map
View

Click here to load this message in the networking platform