473,399 Members | 3,603 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Math expression validator, not evaluator??

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

Nov 17 '05 #1
1 1353
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;
if ((sales - tax) > 20)
THEN (x * y * 0.55)
--
Dave Sexton
dave@www..jwaonline..com
-----------------------------------------------------------------------
"Faraz" <Fa***@discussions.microsoft.com> wrote in message news:E3**********************************@microsof t.com... 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

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Vanish92 | last post by:
I created a dll to evaluate a home-grown data type. I added an entry in the autoexp.dat pointing to my dll for the data type. When I try to debug it (_Debug compile), I have the expression...
3
by: Federico Caselli | last post by:
I'm using visual basic.net, I need to take in input a string containing an expression and return the value, example: "14=14" must return true "14+14" must return 28 "8<4" must return false
1
by: Faraz | last post by:
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
by: Faraz | last post by:
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
by: Faraz | last post by:
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 *...
2
by: Faraz | last post by:
Thanks Dave, To repeat the question: 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)...
12
by: Janiek Buysrogge | last post by:
Hello, Does anyone know if there is a library or a sample project that can parse strings with mathematical expressions inside ? eg. string math = "(23 + 48) ^ 2 - (7.76 * 3.14)"; parser...
0
by: palani12kumar | last post by:
I had some problem regarding creating an expression evaluator using C. i've have not got an clear idea about the "expression Evaluator". Can you please tell me, what's an expression evaluator? and...
7
by: shaun roe | last post by:
Hi, I am using an XSLT to generate an SVG client-side in Firefox. The user opens an XML file in Firefox and sees a display. In doing so, I have to convert from cartesian to polar coordinates, so...
18
by: Franky | last post by:
I don't know how to ask this so that someone will not misread it but here goes. At run time I want to be able to evaluate functions from the Math library, but at design time I do not know what...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.