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

Calculate string

Status
Not open for further replies.

schaapie

Programmer
Aug 29, 2002
2
0
0
NL
I'm looking for a way to calculate the result of a string. For example, after several steps the string looks like this "12 + 523.23 / 8 * 5". Now I am looking for probably a DLL that I can give this string to and that will give me back the result. The way progress does it in it example progs calcxxx is not sufficient and not efficient. I have found a commercial DLL calc32.dll on(
def var vOUT as dec no-undo format "ZZZZZZZZ9.99999999".
def var vFOUT as int no-undo.
def var vFORMULE as char no-undo.

repeat:
update vFORMULE format "X(20)".

run CalcString(input vFORMULE,
output vOUT,
output vFOUT).
disp vOUT vFOUT.
end.

procedure CalcString external "calc/calc32t.dll":
def input parameter stExpression as char.
def output parameter result as double.
def return parameter CALC as short.
end.

But I can't believe this is not standard available in Windows somewhere.
Does anyone know in which DLL I can find such functionality and how to use it
Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top