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



Hi Tim,

Wow, does this bring back memories!  I've seen the other responses to this,
and ok --

1) You don't need to define a separate field for the value to be returned,
the RETURN opcode can have an expression.

2) You must have a prototype in programs that will call a procedure so the
compiler can make sure you're using the correct parameters.

3) You must have the prototype in the module or program containing the
procedure so the compiler can make sure the prototype matches the procedure
interface.  Hence the recommendation for a copybook containing the prototype
so it will be the same in both places (the program using the procedure and
the program defining/containing the procedure).

My opinion has always been that the prototype is there simply to make life
easier for the compiler team.  A better way to do this would be to have the
procedure interface an easily accessible part of the program object.  The
compiler could look here to make sure I'm using the correct parameters, I
wouldn't have to manage separate copybooks of prototypes, and a part of the
DSPPGM command could show the parameters for each procedure.

Peter Dow
Dow Software Services, Inc.
909 793-9050 voice
909 793-4480 fax
909 522-3214 cell

From: "Tim Kredlo"
> Please help!
>
> I am having a VERY difficult time grasping the concepts behind
> prototypes/return values/procedure interfaces.
<large snip>



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.525 / Virus Database: 322 - Release Date: 10/11/2003



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.