Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Return values
Message
From
06/03/2001 11:30:09
 
 
To
06/03/2001 11:07:40
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00482246
Message ID:
00482257
Views:
11
>Is it possible to return multiple values from a procedure. To get 1 value I do:
>
>myvalue = myprocedure(myparams)
>
>Is there a way to get more that 1 return value? If so, how?

Not directly, however you can use parameters passed by reference using the @ "switch":
x = 10
y = 15

x = MyUDF(x, @y)
? x    && x = 40
? y    && y = 30


FUNCTION MyUDF
LPARAMETERS nFirst, nSecond
  nSecond = nSecond * 2
RETURN nFirst + nSecond
HTH!
Sylvain Demers
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform