Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Values from a proc or function

Status
Not open for further replies.

bigspank

Programmer
Aug 10, 2001
28
US
I have a form, on it I need to return multiple values from a proc or function....how do I accomplish this? When you sow a thought, you reap an act. When you sow an act, you reap a habit. When you sow a habit, you reap a character. When you sow a character, you reap a destiny.
 
Several ways are possible. You can create properties of the form which are set in your program. You can put he results in an array and return the array. You can put the results in a temporary table, or global variables. You can send a object with properties to the procedure, modify the object and return it, etc. You can turn the various values into strings, concatenate them with a separator between and return the concatenated string, etc. It's just a matter of what you like best.

Dave Dardinger
 
Common these days in most objects used in windows is to return an object. If no specific value is returned, the return value is .NULL.

So if you want to return more values, you can use an object. This object can be of clas type custom.
You can attach properties to this object, and read them when the object is returned from your procedure.

HTH,
Weedz (Wietze Veld)
My private project:And especially for VFP rookies:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top