× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



"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.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.