Board index » cppbuilder » Math Equations

Math Equations


2004-07-30 03:57:12 PM
cppbuilder33
Does anyone know of a function (or member function) for DOS apps, that can take a string or char array that contains a math equation with numbers an any and/or all operators and parenthesis and return the simplified answer. If not is there ANYTHING that I'm not thinking of, that can do pretty much the same. I have Borland 5.02 compiler.
George
 
 

Re:Math Equations

"George Tamero" < XXXX@XXXXX.COM >wrote in message
Quote

Does anyone know of a function (or member function) for DOS apps, that can
take a string or char array that contains a math equation with numbers an
any and/or all operators and parenthesis and return the simplified answer.
If not is there ANYTHING that I'm not thinking of, that can do pretty much
the same. I have Borland 5.02 compiler.
Quote

George

It would be an interesting, and I think relatively simple function to write
yourself. As a basis for parsing the string I would suggest learning the
functions strtok() and strstr().
 

Re:Math Equations

Hi,
BC3.1 came with an example of a DOS spreadsheet, that deals with all
that things you need. IIRC, Turbo C also came with that example.
Visit this page, too: personal.sirma.bg/Jogy/owl.html and
search for TCellSheet.
HTH,
/JJ.
George Tamero wrote:
Quote

Does anyone know of a function (or member function) for DOS apps, that can take a string or char array that contains a math equation with numbers an any and/or all operators and parenthesis and return the simplified answer. If not is there ANYTHING that I'm not thinking of, that can do pretty much the same. I have Borland 5.02 compiler.

George
--
** Para responderme, cambie _J_ por _
** To respond, change _J_ by _
 

{smallsort}