Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Dec 2010

    how to evaluate mathematical Expression in j2me

    Hi All,

    In j2me i have received some formula String.now i want to parse and evaluate the String...Please help to get this.

    for example, the formula string is : target-status.now, i want the result of target-status.

    is there any third jar file for doing this....

    Please tell me the answer...

  2. #2
    Super Contributor
    Join Date
    Mar 2005

    Re: how to evaluate mathematical Expression in j2me

    given the lack of introspection in java me, you won't get anything that can understand 'target' and 'status' without some help (a table for correspondances, for example). as for the mathematical interpretation it self, the easiest way imho is to use the shunting yard algorithm to get a reverse polish notation stack, which interpretation is quite easy ( http://en.wikipedia.org/wiki/Shunting-yard_algorithm )

Similar Threads

  1. mathematical expressions
    By royalsnn in forum Symbian
    Replies: 5
    Last Post: 2010-03-23, 18:55
  2. Replies: 6
    Last Post: 2008-10-12, 12:09
  3. evaluate the usage of JSR 172 and Web services
    By colombeh in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2007-10-02, 16:04
  4. draw a mathematical function
    By chrishawaii in forum Symbian Media (Closed)
    Replies: 2
    Last Post: 2005-10-13, 10:23

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts