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