all groups > c# > may 2005 >
You're in the

c#

group:

Math expression validator, not evaluator??



Math expression validator, not evaluator?? Faraz
5/3/2005 9:56:01 PM
c#: 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
Re: Math expression validator, not evaluator?? Dave
5/4/2005 3:44:27 AM
I'm not sure exactly what your after...

[quoted text, click to view]

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;

[quoted text, click to view]

--
Dave Sexton
dave@www..jwaonline..com
-----------------------------------------------------------------------
[quoted text, click to view]

AddThis Social Bookmark Button