Re: C-ISAM
Posted in 1992
Topics: General Discussion
According to dave.snyder@snide.com (Dave Snyder): >Quoting Stuart Hemming... >} >} Can anyone out there tell me what the definitions of LONGTYPE and >} INTTYPE are from the Informix C-ISAM manual (Chapter 3)? >} >I'm not quite sure what you are asking so I'll guess... > >INTTYPE is to be used with C short variables (ie. 2 bytes). >LONGTYPE is to be used with C long variables (ie. 4 bytes). > Careful here - being pedantic, ANSI C defines short and long variables in terms of minimum and maximum values, not in terms of bytes required to represent those values. For each compiler, the programmer should refer to limits.h for the applicable range of values for each type. To keep code as portable as possible, the smallest absolute range of values as defined by ANSI C should be used when programming for each type. This also means that compilers can use larger ranges of values for types. Obviously, this could induce programmers to write "less portable" code. -- Jim Kunzman at Teltronics/TCT <jim@tct.uucp>, <uunet!pdn!tct!jim> ----- OS/2 2.0 - 1,000,000+ copies sold. Sweet dreams Mr. Balmy.