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



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.


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.