Math expression validator, not evaluator??

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi everyone,
I am developing a WinForms application and I need a Math Expression
validator, not an expression evaluator. So I want to be able to say...

if ((sales - tax) > 20)
THEN (x * y * 0.55)

without knowing at runtime what the values of sales, tax, x and y are. Is
there any software out there that will do this validation for me?

Thanks in advance
 
I'm not sure exactly what your after...
without knowing at runtime what the values of sales, tax, x and y are. Is
there any software out there that will do this validation for me?

If, at runtime, you have variables sales, tax, x and y, you can obtain their values exactly as your sample code has done.

Why is it that the following code does not support your needs?

if ((sales - tax) > 20)
return x * y * 0.55;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top