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



Doug Handy wrote:
>> ...
>> Aside from being historical and maintaining backward compatibility,
>> it will likely always continue to work this way simply because RPG
>> allows you to use the same field name in multiple files, and they
>> all map to the same variable within RPG.
> ...

Then R. Bruce Hoffman, Jr. wrote:
> ...
>Oh, it's likely to continue all right, but not for the reason you just
>stated, although that's the party line.  ;-)
> ...

Please elucidate.  As far as I know, the reason the compiler continues
to use the same old rules for numeric formats is exactly the way
Doug explained it.  Whatever the reasons for the RPG compiler behaving
the way it did in the past, upward compatibility keeps it behaving the
same way now.  That's upward compatibility of source AND non-recompiled
objects.

Regarding the compiler interpreting the same prototype differently
in different source members, here's how I would do the /copy file
for a prototype that had definitions dependent on F-spec fields:

D               E DS            PREFIX(typeOf_MYFILE_)
D                               EXTNAME(MYFILE)
D                               based(dummy)

D proc            PR
D   parm                        LIKE(typeOf_MYFILE_fld1)
D   parm                        LIKE(typeOf_MYFILE_fld2)

You'd still have a problem in your scenario, but at least you'd find
out at compile time.

Barbara Morris



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.