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




True, but unless I'm mistaken in RPG you would then have allocated space for one more variable than you actually need. I also use LIKE and just live with the fact that my "typedef" in my copy memeber occupies memory instead of simply instructing the compiler how to lay out certain data structures.

I usually use BASED to prevent having extra space allocated... I'll code BASED(Template) on the D-spec (see my message to Joe Lee for an example) this not only prevents it from using memory, but makes it clear to the reader that the prototype is intended to be used as a template.


Of course, you may prefer to use BASED(TYPEDEF) if that's clearer to you. Though, I try to use something that doesn't make reference to a different programming language.

The only downside to that is that you can't set initial values for the fields in the structure... So, you either have to write a subprocedure designed for clearing that object, or you need to omit the BASED keyword so that you can use INZ(*LIKEDS).

But, althought that's slightly awkward, it's still worth adopting this technique...

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.