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



>I was coming from the stand point of
>if program A called program B with 0
>(zero)parameters, but program B was
>expecting 1 parameter then program B
>would come up with a "pointer not
>set for location reference" error when
>that field was referenced;

If we're talking about a program that does NOT use %parms, and a
subprocedure that does NOT use %parms, the behaviour you describe is
identical in procs and progs.  That is, if the called code does NOT
explicitly check to see how many parameters have been passed, then that code
will have Bad Things happen when it references the non-passed parameter.

I say Bad Things, because you may have a stale pointer left on the stack,
and NOT get a MCH3601, but some other unpredictable failure as the called
code works on some other part of memory it doesn't own.

If we're talking about a program uses that %parms, it most certainly can
restrict reference to the non passed parameters just as a subprocedure that
uses %parms can.  An earlier reply had a code snippet from a working program
that demonstrates this.

That's why I feel that subprocedures do not offer more functionality over
programs in this particular.

There was a reply about *OMITting a parameter in the middle of a list, but I
honestly have never seen a need to do that in a subprocedure and so freely
admit to ignorance of how to implement it in a called program.  I also
freely admit to not being the brightest bulb in the pack.  Perhaps there's
more demand for this than I ever thought of in my limited experience.
Something to keep in mind when comparing procs to progs though.
  --buck


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.