Skip to content

Comment on Compiling PHP's Eval() to .NETparent

Comments

Do you have examples of the types of "formulas" that you wanted to execute?

Also, how would one execute said formula?

Any valid Visual Basic.NET expression is supported. Here are some examples:

  (latestquote - previousquote) / previousquote
  iif(isonlineorder, "Online", "Retail")
  FirstName & " " & LastName
  iif(IsNothing(Amount), "Amount missing",  Format(Amount, "c2"))
  "Q" & ((OrderDate.Month - 1) \ 3 + 1)
  MonthName(DatePart(DateInterval.Month, Today), false)
  DateAdd(DateInterval.Day, 1, Today)
See this file for example of usage: https://github.com/Rajeev-K/formula-parser/blob/master/src/R...
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.