To be honest, I feel completely tied to these limitations (at least when
working with exported procedures that are intended to (or could
reasonably) be used by the interface). We're developing for a VARPG
interface. If we change interfaces, we'll redo the interface and link
back up to the service program procedures as VARPG does. So we're
covered.

I don't mean to imply we go back and change existing procedures to
adhere to this limitation. For those we do create wrappers. But we're
making a big push to separate business logic from interface logic and as
we do this, we are following the limitations of the API.

Kurt Anderson
Application Developer
Highsmith Inc

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Wilt, Charles
Sent: Friday, May 23, 2008 11:23 AM
To: Midrange Systems Technical Discussion
Subject: RE: Returning values with a procedure

Kurt,

Rather than limit yourself like that, ever considered simply wrapping a
non-compatible procedures you need in PHP, EGL, or VARPG in a compatible
procedure that calls the original?

Charles Wilt
--
Software Engineer
CINTAS Corporation - IT 92B
513.701.1307

wiltc@xxxxxxxxxx


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-
bounces@xxxxxxxxxxxx] On Behalf Of Kurt Anderson
Sent: Friday, May 23, 2008 12:07 PM
To: Midrange Systems Technical Discussion
Subject: RE: Returning values with a procedure

Note: If you ever intend to have exported procedures with return
variables that will be accessed by PHP, EGL, VARPG, or any other
language that will access the procedure via the API (can't think of it

off the top of my head) - you will be limited to a return value of 10i

0. Because of this we generally return values as parameters. (Also
due to this, we can't use Options(*Nopass), my favorite parameter
passing option... unavailable to me.)

Oh, and another limitation with this API is you can only have 7
parameters (of course a data structure parameter gets around this).

Kurt Anderson
Application Developer
Highsmith Inc

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Adam Glauser
Sent: Wednesday, May 21, 2008 10:27 AM
To: midrange-l@xxxxxxxxxxxx
Subject: Re: Returning values with a procedure

Booth Martin wrote:
Here is an example of
what I'd like to do:

c eval Duty = CanadianDuty(parm1: parm2: parm3)

and the procedure CanadianDuty would have 3 parameters as input and
return the value of the duty.

I believe I can do that process, but I *know* I have no idea how to
do

the same thing where I need to return 2 values, say "Duty" and
"Tariff".

One way to do it is to return a data structure, so your code would
look
like:

c eval CustomsFees = CanadianDuty(parm1: parm2:
parm3)
...
c eval totalCost = ... + CustomsFees.duty +
CustomsFees.tariff ...


You can also use "output" parameters, as you might if you were coding
a program instead of a procedure to retrieve the information:

c callp CanadianDuty(parm1: parm2: parm3: duty :
tariff)


Yet another way would be have one procedure for each type of fee,
which would be closer to your first example:

c eval Duty = CanadianDuty(parm1: parm2: parm3)
c eval Tariff = CanadianTariff(parm1: parm2:
parm3)
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing

list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take
a moment to review the archives at
http://archive.midrange.com/midrange-l.

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing

list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take
a moment to review the archives at
http://archive.midrange.com/midrange-l.




This e-mail transmission contains information that is intended to be
confidential and privileged. If you receive this e-mail and you are not
a named addressee you are hereby notified that you are not authorized to
read, print, retain, copy or disseminate this communication without the
consent of the sender and that doing so is prohibited and may be
unlawful. Please reply to the message immediately by informing the
sender that the message was misdirected. After replying, please delete
and otherwise erase it and any attachments from your computer system.
Your assistance in correcting this error is appreciated.
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at http://archive.midrange.com/midrange-l.


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.