Calculate Formula

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Gálos Zsuzsa

    Calculate Formula

    Hi all,
    I need to calculate Formulas.

    For example:
    dim strFormula as string="25*(12-6)"

    I ned a DotNet Function to calculate this Formula (25*(12-6)=150):

    dim dblValue as double = 150

    Does anyone know how can i do this?

    thanks a lot

    Zsuzsa


  • Cor

    #2
    Re: Calculate Formula

    Hi Gálos

    I have seen a lot of questions here for an "eval" function
    [color=blue]
    > dim strFormula as string="25*(12-6)"
    >[/color]
    I never saw a proper answer for this in this newsgroup.

    But maybe you get a good link.
    (That is why I translate your message to "eval")

    Or you can search this newsgroup yourself for "eval" there where some
    answers, but I never saw one from which I said, that is it.

    Cor


    Comment

    • Herfried K. Wagner [MVP]

      #3
      Re: Calculate Formula

      * "Gálos Zsuzsa" <galoszs@chello .hu> scripsit:[color=blue]
      > I need to calculate Formulas.
      >
      > For example:
      > dim strFormula as string="25*(12-6)"
      >
      > I ned a DotNet Function to calculate this Formula (25*(12-6)=150):
      >
      > dim dblValue as double = 150
      >
      > Does anyone know how can i do this?[/color]

      <http://www.palmbytes.d e/content/dotnetlibs/mathlib.htm>

      --
      Herfried K. Wagner [MVP]
      <http://www.mvps.org/dotnet>

      Comment

      Working...