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



<John Yeung>
Still, I disagree, a little bit
</John Yeung>
mostly there is more than 1 opinion and in real life more than TRUE and FALSE

<John Yeung>
I guess
that depends on what you consider "readable". ;) But you can take the
system API approach and have, say, one parameter which tells you which
function to use and then either a bunch of small, sometimes optional
parameters if they can be the same types among the different
functions, or a big parameter that you need to chop up with different
data structures depending on the function. Everybody keeps saying
that the way to handle ILE prototypes is to put them in /COPY members.
Well, just have the corresponding data structures in /COPY members
instead.
</John Yeung>
Comparing system APIs with the command interface of AS/400, the command interface is much more stable, with better usability, because the system ensures type safety for the parameters - sometimes even at compiletime. And good old OPM CL "compiler" does this work much better than "modern" RDI!!!
The problem with your approach, having a function Code and some binary huddle (for RPG, it's name is DataStructure) is, that every programmer could pass what ever he wants and if someone is passing some garbage, you could have luck and the called function crashs. I have seen such parameter interfaces too often and there was one guy in every team passing some nonsens to such a function forcing the called function to do silly things.. Using this implementation it's by far to easy to write bad programms. (BTW: in the world of /36 I've seen complete applications, writing a function code and some binary huddle to the LDA and a driver OCL called the function without any parameter and the called programm pulled some binary huddle out of the LDA, modified other binary huddle in the LDA... - It took me hours and nights to find programming errors)

The Copy Members of ILE, that's one of the work arounds the programmer has to use to fix the incomplete work of lazy programmers who implemented ILE. Having a look to other languages there where much better soultions out at the time ILE was introduced to AS/400. In my opinion ILE is by far not enough a "modern" programming language and environment would have to provide, but compared to OPM it_s a step in the right direction.

Dieter

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.