|
Well... 20I 0 can only hold 19-digits, but 20U0 can hold 20-digits. All I know is that when I teach RPG IV, many people (not most, but many) have used the "B" data types before and refer to them as 4-byte binary and 2-byte binary. I have rarely if at all heard anyone refer to a 4-byte binary field as a 9-digit binary field. In trying to teach people prototyping of OS/400 APIs, the fact that the docs call them Bin(4) and Bin(2) (among other things) is easily translated into 4-byte int or 2-byte int. Hence 4I0 and 2I0 is much quicker to absorb. I mean look at the notes on this list--how many regular and advanced RPG programmers continue to use 4B or 1 to 4B0 or 5 to 8B0 notation? It is obvious to me that 10I0 will only be absorbed by the body of RPG IV programmers through osmosis. At the end of the day my goal is get people to stop using the ULTRA SLOW and EXTREMELY INEFFICIENT "B" data types. We're already a little pregnant as they say with respect to 5i0 and 10i0 already being out there. -----Original Message----- From: rpg400-l-bounces+cozzi=rpgiv.com@xxxxxxxxxxxx [mailto:rpg400-l-bounces+cozzi=rpgiv.com@xxxxxxxxxxxx] On Behalf Of Tony Carolla Sent: Wednesday, March 09, 2005 2:43 PM To: RPG programming on the AS400 / iSeries Subject: Re: Making sense of 4-byte binary fields <snip> > How is 10I0 more clear than 4I0 > Vs. > 32I 0 > ??? </snip> I think the crux here is that these binary fields don't conform to the way that other numeric types are coded. A 6S0 is so named because you can fit six digits, _any_ six digits inside. From a casual glance, one would assume that a 4I 0 would hold four digits. At the same time, a 10I 0 won't hold _any_ ten digits, it will hold ten. But this is at least closer to the RPG way of specifications. I guess a 4I0 can hold any four bytes, but not digits. If we started D-spec'ing based on storage taken, then what about packed? shouldn't a 5P 0 be a 3P 0 -- three bytes are used. -- "Enter any 11-digit prime number to continue..." -- This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.