Expression Evaluation DotNet

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Yoav Brav

    #1

    Expression Evaluation DotNet

    Hi,

    I would like to convert a string such as "(3+2)/4" and return
    the answer.
    But I want the user to be able to type in the formula into a textbox
    and have the ASPX convert that string value into a mathematical expression
    and return the calculated value

    tx

    yoav
    brav@brav.co.il
  • Daniel Bass

    #2
    Re: Expression Evaluation DotNet

    don't know if asp.net's got any special way for this, but i'd break the
    expression up and parse through it, it's not that simple with things like
    BODMAS ordering etc...

    a binary tree's probably the easist structure to use.

    "Yoav Brav" <brav@brav.co.i l> wrote in message
    news:bca415d7.0 307250253.4bdb3 b58@posting.goo gle.com...[color=blue]
    > Hi,
    >
    > I would like to convert a string such as "(3+2)/4" and return
    > the answer.
    > But I want the user to be able to type in the formula into a textbox
    > and have the ASPX convert that string value into a mathematical expression
    > and return the calculated value
    >
    > tx
    >
    > yoav
    > brav@brav.co.il[/color]


    Comment

    Working...