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



So instead of an error when compiling the program, I'd get an error when they try and run the program after it's been moved to production? Better for the programmer, worse for the users?

--
*Peter Dow* /
Dow Software Services, Inc.
909 793-9050
petercdow@xxxxxxxxx <mailto:petercdow@xxxxxxxxx>
pdow@xxxxxxxxxxxxxx <mailto:pdow@xxxxxxxxxxxxxx> /


On 3/5/2018 9:08 AM, D*B wrote:
Hi,
I don't realy understand, why it should be so hard to do.
Right now we have:
at compiletime: checking against the declaration of a prototype, rather weak hopefully the same prototype is used as in the implementation.
at bind process: resolving symbols by name, binding by position (could be stronger, if bound by name), creating a signature (could be stronger if the signature would use name and parms) - the real problem here is, that many people fake the signature to avoid rebind needs (strange, very strange!!!)
at runtime: signature check.

IMHO it wouldn't be too hard ton enhance this process:
- no check needed at compiletime, just making a list of unresolved references, including parms would be enough
- at bind time: check use of unresolved references against the list of exports in all components (modules, SRVPGMS) available by parm of bindprocess.
in other words: move the checking usage against PR from compile to bind. To make this happen, write the declarations of the exports in the header section of the Modules/SRVPGMs. This seems to me very similar to putting the source into the object for debug purpose.

Regards

Dieter

<Jon>
OK - I see where you are coming from - but, as you seem to realize, what you would like is hardly a practical option.

What would be required to enable the "PI rules" philosophy is a system wide extension that captures the full details of the parameters and return value. Right now the closest we have to that is PCML and that has multiple problems including an inability to be able to represent a number of parameter types. Even if that problem were addressed (not likely worth IBM's investment) then there is still the problem of late binding. For instance a dynamically called program can be subject to library list and other factors - how can the compiler validate against something that may not even exist at compile time. Same problem with Service Program procedures that are dynamically bound - or bound via procedure pointer.

I am interested in minimizing problems with what we have and asking for extensions (such as the RFE in question) that help to avoid errors. I think we have more chance of IBM i being open sourced than seeing the types of changes needed to avoid protos altogether.


Jon Paris
</Jon>


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