×
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.
Mark S. Waterbury wrote:
I am more concerned with checking the type, length and decimal places
for "compatibility" across CALLs -- in other words, checking each
parameter for the correct type of argument. Especially across
separately compiled units (modules).
The compiler and/or runtime should provide for type checking of
parameters / arguments for external procedures at bind-time, (for
bind-by-copy or bind-by-reference), and compatibility checking at
runtime for late-bound calls, to help ensure "type safety."
Mark, in David's case, the parameter that was actually passed to the
procedure was the correct type, 9p2. At least, correct by RPG's rules.
Not necessarily correct for the application.
I can imagine an RPG parameter-passing mechanism, say CONST(*EXACT) and
VALUE(*EXACT), where the passed parameter would have to be a variable
defined exactly the same as the prototype. Maybe a literal too, as long
as it was the exact same as the prototype. (I see reading further in
the thread that Scott Klement has already suggested this.)
It's a whole different thing to provide run-time type-checking on
parameters between modules. That would be great, but I don't think it's
currently feasible.
As an Amazon Associate we earn from qualifying purchases.
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.