|
On Wed, 2004-05-19 at 23:08, Joe Pluta wrote: > When converting a C prototype to RPG< it seems to me that "int" > translates to "10i 0". True? Not true? What about "long int" - is > that "20i 0"? And where does the "u" come into play - is "10u 0" > equivalent to "unsigned int"? > Lets see. 10i0 can hold the integers from -2 billion (and change) to +2 billion (and change). 10u0 - yes unsigned - is 0 - 4 billion (and change). Depends on each C compiler as to what internal length corresponds to how many bytes of storage. I think int and long int are the 10i0 on the iSeries. short int can hold the integers from -32000 (and change) to +32000 (and change), you can refer to it in RPG as 5i0. unsigned short would be 0 to 64000 (and change), so 5u0 for it. Sorry it's late and I'm too lazy to go find the actual exact limits. Try a search on google for MAXINT. And I'm sure someone will correct me if I am misremembering, it's been awhile. > And where, pray tell, is the documentation that outlines this? Don't know, and haven't bothered to search it out. Sorry. -- Regards, Rich Current Conditions in Des Moines, IA Overcast Temp 71.6F Winds out of the Southeast at 6mph
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.