|
Jon.Paris@halinfo.it wrote: > > The benefit of Varsize is that a generic routine such as the "Center > one here > can accept any length of parameter from 1 to 256 characters. Get ri > of Varsize > and the parm always has to be 256 long. No, he had his input parm specified as CONST... So, in this situation, his input variable could've been any length. therefore.. I asked him what the point of specifying options(*varsize) was. > > >> Third, if you do want to use options(*varsize) you could use an > operational > descriptor to get the string length, and then make sure that you onl > reference > that length of data... > > While you could use descriptors they are a pain in the backside to > implement > and (since the implementation is far from complete - e.g. numerics > aren't > supported) have very limited utility. Personally I'd pass the lengt > of the > output field to the procedure using %Size. > > Also this is a good use for varying length fields together with the > keyword > CONST or VALUE - this would avoid having to pass the length of the > input parm. Yes, this is a good use for varying length fields. Am I the only person in the whole world thats still using V3R2? Everyone seems to just assume that the new capabilities of V4R2+ are available on every AS/400... :( +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | 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.