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



On 17 Apr 2013 14:23, Barbara Morris wrote:
On 4/17/2013 3:46 PM, CRPence wrote:

... and in other languages [e.g. RPG] the equivalent assignment
will often effect blank padding which means blanks would likely
overwrite unexpected portions of automatic storage in the invoking
program... which could lead to all sorts of problems.

In RPG, you would code %SUBST on the left-hand-side.

%subst(rtnval : 1 : len) = something;

It will do blank padding only up to "len" bytes, and not touch
rtnval for the bytes following "len" bytes.


Yes. Sorry. I was referring to any effective equivalent of the Cl request "CHGVAR &rtnval %sst(&pgmvar 1 &forLenOf)", as performed in another language, might be problematic. Although that request in a CL might effect overwriting only %sst(&rtnval 1 &forLenOf) simply due to its implementation, that particular effect should not be presumed in CL, nor be expected in other languages, because in other languages the effectively identical request [as translated literally from CL to that other language] would likely cause blank padding of the &rtnvar. For example, I believe the following RPG request [as an effective literal translation of the CL request into an RPG request] would blank pad the variable rtnval to its declared length [and thus why the ability to assign to a substring is beneficial]:
rntval = %subst(pgmvar 1 forlenof);


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.