|
Another compiler????????????????????????????????? -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Barbara Morris Sent: Monday, June 07, 2004 1:23 PM To: rpg400-l@xxxxxxxxxxxx Subject: Re: Prototyping a constructor of java String class "Rooney, Michael P" wrote: > > Barbara, > > Thanks for clarifing my questions and comments. In one of my posts > I mentioned how there seemed to be no impact in combining VARYING > with OPTIONS(*VARSIZE). Is this a valid observation? Given your > feedback, does it make sense, as a best practice, to combine the 2? > Yes, it's a valid observation. With a CONST VARYING parameter, the compiler doesn't really need OPTIONS(*VARSIZE) to know it is safe to pass a shorter parameter without copying it to a temporary. The called procedure isn't supposed to access beyond the passed length of the string, so it doesn't matter what, if anything, is passed beyond the valid length. Best practice? Hmm. Another compiler might not make that optimization without being told *VARSIZE, so I guess it's a good idea to code both. -- 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-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.