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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Call VFP9 COM Object To Evaluate User Supplied Formulas

Status
Not open for further replies.

Auguy

Programmer
May 1, 2004
1,206
US
I'm want to allow users to enter formulas based on some of the fields in my tables. I've done a little searching and seen some .NET calculators and expression parsers. Most seem to be fairly complicated. I'm wondering if I can create a COM object in VFP9 and call it from .Net. The reason I think this might be easier is because of the Evaluate() command allowing you to do something like this in VFP9
Code:
Price=12.34
Qty=22
?EVALUATE("Price * Qty")
and the result returned is 271.48. I could then call this COM object passing the parameters Price & Qty to get my results. Is this feasible, worth pursuing and easier than trying to get one of the .NET calculators to work?


Auguy
Sylvania/Toledo Ohio
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top