|
Actually, they didn't. B data types can be either 4 or 9 digits in length. A 4-digit B data type is an 16-bit integer (Int2) a 9-digit B data type is a 32-bit integer (int4). The way you declare an Int2 in RPG IV is 5i0, the way you declare an Int4 in RPG IV is 10i0, the way you declare an Int8 in RPG IV is 20i0. There's also an Int1, 8-bit integer that you can declare as 3i0. Bob Cozzi cozzi@rpgiv.com Visit the new on-line iSeries Forums at: http://www.rpgiv.com/forum > -----Original Message----- > From: rpg400-l-admin@midrange.com [mailto:rpg400-l-admin@midrange.com] On > Behalf Of Scott Klement > Sent: Tuesday, December 11, 2001 11:55 PM > To: rpg400-l@midrange.com > Subject: RE: Prototype for a command parameter. > > > Oh, yes... I knew they added 8-bit integer fields, but I didn't realize > that they continued to expand the (worthless) "B" data type to 8-bits as > well. > > (Or, more correctly, it didn't occur to me to check that...) > > Thanks for pointing it out! > > On Tue, 11 Dec 2001, David Morris wrote: > > > Scot, > > > > Actually, you can define a 2B 0 field; it simply restricts the range > > of values that are valid in the field to -99 through 99. Never tried > > it though and I bet that nine times out of ten when it is used, it is > > a > > mistake. > > > > David Morris > > > > >>> klemscot@klements.com 12/11/01 03:35PM >>> > > > > There is no "2B 0". If you mean "4B 0" (which is 2 bytes long, but 4 > > digits) then yes, they are very close to the same thing, except that > > the > > "B" data type arbitrarily chops the number off at 4 decimal digits, > > while > > the "I" data type allows the full 16 binary digits. > > > > _______________________________________________ > This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list > To post a message email: RPG400-L@midrange.com > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l > or email: RPG400-L-request@midrange.com > 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-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.