×
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.
Hi all,
Does RPG implicitly cast a varchar return value (from a procedure) to char when the receiver variable is char?
Sample random code (2 lines):
dcl-s CharacterVariable char(50) inz(' '); //character date type
CharacterVariable = EmailAddress ( 'Bob Saget' ); //EmailAddress has return value defined as varchar(50).
Although this appears to work for some of my teammates I was told by Bruce Vining (remember Bruce??) that if IBM does not explicitly document a behavior then one should never assume it to be true "just because it works for you." (paraphrasing Bruce).
I believe his exact words were, "Bad things can happen." :)
I was thinking of instructing my team to make this practice verboten, but I thought I'd ask the list first.
Unless I'm blind I could find no text in the RPG Reference to address this, much less come close to implying it.
Regards,
[cid:image001.png@01D9BAE8.13979320]
Wynn Osborne
Senior IBM i Programmer-Analyst,Database Administrator
6503 Powell Road | The Villages, FL 32163
Main: 352.750.1515 | Support: 352.674.1530
Direct: 352.674.1563 | Fax: 352.750.1616
wynn.osborne@xxxxxxxxxxxxxxxxxx<mailto:wynn.osborne@xxxxxxxxxxxxxxxxxx> |
http://www.TheVillagesTSG.com<
http://www.thevillagestsg.com/>
As an Amazon Associate we earn from qualifying purchases.