|
IF you add BASED to the original field, no storage is allocated for it. For example: D MyDate_T DS BASED(ptr_Nowhere) D Year 2S0 D Month 2S0 D Day 2S0 D Mydates DS LikeDS(MyDate_T) -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of James Rich Sent: Thursday, February 03, 2005 3:30 PM To: RPG programming on the AS400 / iSeries Subject: RE: Prototyped Procedures On Thu, 3 Feb 2005, Scott Klement wrote: >> I think I see your point here. It may well be that the best current >> solution is the one you suggest. But it appears to me that this solution >> is a work around for the lack of data type definitions in RPG (i.e. >> typedef). But that is RPG's fault, not yours. > > You can use LIKE and LIKEDS in pretty much the same way you'd use typedef in > C. I do that all the time. True, but unless I'm mistaken in RPG you would then have allocated space for one more variable than you actually need. I also use LIKE and just live with the fact that my "typedef" in my copy memeber occupies memory instead of simply instructing the compiler how to lay out certain data structures. James Rich It's not the software that's free; it's you. - billyskank on Groklaw -- 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.