Thread View: borland.public.jbuilder.java.api
3 messages
3 total messages
Started by Ashwin
Mon, 02 Dec 2002 01:42
How to calculate String(Expression) into Formula in servlets
Author: Ashwin
Date: Mon, 02 Dec 2002 01:42
Date: Mon, 02 Dec 2002 01:42
9 lines
1324 bytes
1324 bytes
Anyone can help me how to calculate string(Expression) into formula. I am getting one Formula from Database as a String. That string like" x+2*y". I have the values of these x and y variables. But i am unable to pass these values into this formula and i am unable to split that formula also. Can anyone give the code i thankfull to them.
Re: How to calculate String(Expression) into Formula in servlets
Author: John McGrath TeamB
Date: Wed, 04 Dec 2002 18:48
Date: Wed, 04 Dec 2002 18:48
25 lines
1714 bytes
1714 bytes
On Mon, 2 Dec 2002 09:42:36 +0800, Ashwin wrote:
> Anyone can help me how to calculate string(Expression) into formula.
>
> I am getting one Formula from Database as a String.
>
> That string like" x+2*y".
> I have the values of these x and y variables. But i am unable to
> pass these values into this formula and i am unable to split that
> formula also.
>
> Can anyone give the code i thankfull to them.
There is nothing in the standard Java classes for handling this.
However, if you search Google with "Java expression evaluator", you
will find plenty of packages that do.
--
Regards,
John McGrath [TeamB]
---------------------------------------------------
Before sending me e-mail, please read:
http://www.JPMcGrath.net/newsgroups/e-mail.html
Re: How to calculate String(Expression) into Formula in servlets
Author: Shankar Unni
Date: Thu, 05 Dec 2002 19:29
Date: Thu, 05 Dec 2002 19:29
7 lines
1423 bytes
1423 bytes
John McGrath [TeamB] wrote: > There is nothing in the standard Java classes for handling this. > However, if you search Google with "Java expression evaluator", you > will find plenty of packages that do. Try http://www.beanshell.org.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads