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



Tim Kredlo wrote:
> ...
> In our '/Copy' prototype source member, I have created a 'generic'
> prototype to use for calling these programs:
> D CalPgm          Pr                  ExtPgm(Called)
> D  Pa           128A
> D  Prm1 256A
> D  Prm2 256A
> ...
> Problem:
> I am writing a new program, the first that does not need to call any of
> the old 'Plist' programs, so the field 'Called' was not declared.
> I '/Copy'd the prototype source member into this new program for calling
> some other programs prototyped there.
> 

I'd define "called" in the prototype file, since it's logically part of
the prototype.  But if you do that, you'll have to modify all the exist
programs that have already defined "called".

Or you could modify your prototype file like this:

 /if defined(dont_need_generic_call)
D CalPgm          Pr                  ExtPgm(Called)
D  Pa           128A
D  Prm1 256A
D  Prm2 256A
 /endif

and then in your new program, code

 /define dont_need_generic_call
 /copy prototypes

But if most new programs will not require this generic program, it might
be more convenient to reverse the condition, 
  /if not defined(need_generic_call) 
and require the old programs to code this before the /copy.
 /define need_generic_call
(but that would depend on how much pain would be involved in changing
the old programs).


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.