Am 11.08.2025 um 09:49 schrieb Patrik Schindler <poc@xxxxxxxxxx>:

Am 10.08.2025 um 23:50 schrieb Daniel Gross <daniel@xxxxxxxx>:

we use a char(2) parm that is passed to every interactive program, and it returns there a "return code".

Very lean and interesting approach! Thanks!
I still fail to grok that that — due to them by default being a pointer —, passed parameters are inherently bidirectional.

Yes they are - until you use the CONST keyword. In this case it's still a pointer, but the content is "unmutable" - at least, the compiler enforces that - you can stall change the contents using some tricks - but that's a story for another day.

That said - we always define program (entry) parameters as CONST - unless we really need to use it to communicate something back.

There is an idea, to allow VALUE for program parameters:

-> https://ibm-power-systems.ideas.ibm.com/ideas/IBMI-I-4546

I think that would be quite useful, and would set the dynamic program call on par with the procedure call - even if it's technically something completely different.

So I voted for that idea, and it's a "future consideration" meanwhile ... but who knows, when the RPG goddess will gift us that feature ;-)

BTW: Messages are more or less something for exceptions IMHO - and the new SND-MSG opcode makes it very easy to use (I know, you don't have that on your 170).

Regards,
Daniel

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