how can i convert equation formulas to a text string in delphi 5 ?
i'm thinking about eg the microsoft word equation editor, and the formula
typed in has to be converted to a simple text string.
anyone got an idea ?
thanks.
Yes!
You may do what everyone does, even Delphi does it, use a parser and a
grammar! Use only unary and binary functions.
Example:
X/2 you could transform it in the string 'Div(X, 2)'.
(X/2) + 4 would be 'Add((Div(X, 2)), 4)'
(X/2) + 4 = 10 would be 'Equal(Add((Div(X, 2)), 4), 10)'
I think this is what you were looking for...
Best regards,
--
Fernando Martins
_____________________________________
Altitude Software - R&D Server
-------------------------------------
Av. dos Combatentes, Nº 43, 8º
1600-042 Lisboa, Portugal
Office: +351 217 205 139
Fax: +351 217 205 090
URL: http://www.altitude.com
_____________________________________
Why live on the edge if you can jump from it ?
what i really want, is to make a formula in an equation editor (of in
microsoft word), and automatically convert this to a string (eg
sqrt(a/b)+1600*c).
Peter
"Fernando Martins" <fernando...@altitude.com> wrote in message
news:3BFCCFC9...@altitude.com...
> what i really want, is to make a formula in an equation editor (of in
> microsoft word), and automatically convert this to a string (eg
> sqrt(a/b)+1600*c).
Oh, sorry, did not understood your first post then...
Sorry, but in that I think I cannot help you with...
Maybe exploring the objects that link to MS Word would be a start...