Good News Everybody!
The new search engine is LIVE!
Please report any problems to david (at) midrange.com.
|
You typed and formatted/quotes all of that on a miniature screen? :-O Thanks for your efforts!
Thanks - but I‘m from the generation that took a lot of flak in the news groups where you easily got hit by a *plonk* for posting „TOFU“ ;-)
Yes - safety is good - because of this we define ALL parameters as „const“ - only parameters that should „pass back“ values are not „const“.
We use „value“ only in very special cases.
You’re really missing out a lot. Most things I write are V7R3 and above and **free RPG - because this is what I develop.
When calling „normal“ programs (*PGM objects) then you have to resort to passing by reference. The „value“ keyword is not supported for *PGM calls.
But „const“ is supported - so you can do a lot there.
This means, there is no variable scoping, and inadvertent change of variables within the program flow is a constant source of corner cases to catch.
This is where local procedures (defined in the same member) are handy. Yes you have to type a bit more initially - but you have variable scoping and real parameters - so hell yeah, use it.
In C, retval = dothis() feels very easy.
Yes - here we are - create service programs with procedures, and you can have exactly this with procedures outside of your source member.
In classical RPG, probably old enough to when there is no EVAL, I guess messages are involved. A topic I constantly fail to wrap my head around.
Message handling is really not easy
- especially because „snd-msg“ and „on-excp“ arrived late to the party and one had to use system APIs for everything.
Thanks for the hint! Need to look into this, and if it's already available with V4R5.
Can’t say that - but I really think you should jump ship to a never release if somehow possible.
If only for private interest - PUB400 is your friend. If you company has problems investing in new hardware, then the company behind PUB400 could maybe part of the solution.
Staying on V4R5 is definitely not good - this is so far behind, that somehow nobody can help you a lot.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2026 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.