Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

number to packed decimal (Urgent)

Status
Not open for further replies.

Premalm

Programmer
Mar 20, 2002
164
US
how do i compress a number to packed decimal in C ?
 
Sounds Cobol-ly to me !
I don't want to sound like I'm teaching you to suck eggs.
C has char,int,long,float double etc - signed or unsigned
and in effect 'packs' numeric values into 1,2,4,8 or 16 bytes. E.g. 4,294,967,395 can be held in an unsigned long and uses 4 bytes to store it, on most implentations.
HTH ;-) Dickie Bird
Honi soit qui mal y pense
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top