|
What version of the OS are you using.... you need at least V3R7 for this.. also, if you are on V3R7, make sure that your compile option is *CURRENT and not *PRV. Bradley V. Stone bvstone@taylorcorp.com http://prairie.lakes.com/~bvstone/ "Does this proposition entail my dressing up as Little Boe Peep?" - Fletch > -----Original Message----- > From: David Morris [SMTP:dmorris@plumcreek.com] > Sent: Wednesday, April 29, 1998 12:47 PM > To: RPG400-L@midrange.com > Subject: Pointer arithmetic > > Listees, > > Does anyone know if the following should work? Based on the manual I > think it should work I faintly remember doing this in the past, but I > can't get to work now. > > D OffSet 10I 0 > D Ptr1 * > D Ptr2 * > ... > C EVAL OffSet = Ptr1 - Ptr2 > > I get the following message: > > *RNF7421 30 1 Operands are not compatible with the type of > operator. > Cause . . . . . : Operands must be of class > character or > graphic for character operations, numeric for > arithmetic > operations, and indicator for logical and > relational > operations. In a comparison operation, both > operands must > have the same data type. The specification is > ignored. > Recovery . . . : Specify the correct operand > classes and > data types. Compile again. > > The manual states the following: > > Operator Operand 1 Type Operand 2 Type Result Type > > - (subtract Basing Pointer Basing Pointer Numeric > > pointers) > > > What am I missing here? I have coded a work-around but I want to > understand why this doesn't work. > > Thanks, > > David Morris > > > > ! > > > > ! > ! > > * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * > * * > * This is the RPG/400 Discussion Mailing List! To submit a new > * > * message, send your mail to "RPG400-L@midrange.com". To unsubscribe > * > * from this list send email to MAJORDOMO@midrange.com and specify > * > * 'unsubscribe RPG400-L' in the body of your message. Questions > should * > * be directed to the list owner / operator: david@midrange.com > * > * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * > * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This is the RPG/400 Discussion Mailing List! To submit a new * * message, send your mail to "RPG400-L@midrange.com". To unsubscribe * * from this list send email to MAJORDOMO@midrange.com and specify * * 'unsubscribe RPG400-L' in the body of your message. Questions should * * be directed to the list owner / operator: david@midrange.com * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
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.