• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 196
  • Last Modified:

reading an equation from an edit box?

How can i make the program itself understand an equation that i write into an edit box ,  for example , i would write 4x^3 + 2x^2 -x +2 ,
the computer would just see it as the string ' 4x^3 + 2x^2 -x +2' , but i want it to be able to read it 4*(x*x*x)+2*(x*x)-(x)+2 where the x would be a declered variable in the program , is there a way to do this without 1000 if loops or should i just build the program with dozenz if listboxes to make my life more easier , but the program less user friendly.
When and if i´m able to do this , i´m going to make the computer draw graphs in a given domain , and hopefully also calculate the area between two graphs , but it kinda all lies on that damn edit compenent , can someone out there please help me , this is for my final project in a programming course, and i am getting really tired of this .......
0
hafhalf
Asked:
hafhalf
  • 4
  • 2
1 Solution
 
rwilson032697Commented:
Take a look at xaeval.zip
from DSP (http://sunsite.icm.edu.pl/delphi).

Go to the search engine and type it in (the URL it gices me doesn't copy and paste properly.

Cheers,

Raymond.

0
 
rwilson032697Commented:
Also look at these ones from the same location:

parsers1.zip: "TFunctionParser and TComplexParser parse mathematical functions and evaluate them. About 80 real and 30 complex predefined functions and operations available! Constants, functions and variables can be defined by the user! "

parser10.zip: "TParser - parsing and evaluating mathematical expressions specified at runtime. Only about 40% slower than the equivalent compiled expression"

exprev10.zip: "A mathematical function parser that allows you to calculate a value given an expression in string form. Supports: +, -, *, /, ^, (, ), ABS, ATAN, COS, EXP, LN, ROUND, SIN, SQRT, SQR, TRUNC, and unlimited number of user-defined variables"

Cheers,

Raymond.



0
 
hafhalfAuthor Commented:
Thanx Raymond ,

but there is a little problem , although i don´t doubt that these components work , the url for xaeval.zip  is invalid , and the search engine on the delphi super page is bogus , and when i search for parser1.zip it give me everything except that file , so if you could tell me were i could get these files elsewhere i would be very greatful....

                                                                            Hafsteinn.
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
rwilson032697Commented:
I'm sorry you have had problems. Give me your email address and I will download and email them to you - can't say fairer than that :-)

Cheers,

Raymond.
0
 
hafhalfAuthor Commented:
thanx
Raymond

my e-mail is hafhalf@fas.is

Hafsteinn.
0
 
rwilson032697Commented:
I have sent them to youe email address above.

Cheers,

Raymond.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now