We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Calculate OR and AND

rehi, this one is a long shot. For this one, I''m not sure because it''s not clear in the documentation. I was wondering if we can use AND and OR as operator. Because if so, there is a bug. As a function, it works perfectly. I tried that: =(1=1) or (2=1) and it return FALSE instead of TRUE but this one is okay: =or (1=1 , 2=1) it returns TRUE. I would rather be able to use the calculation logic with operator more than with functions, it''s easier to read. But we can live with it though. ;-)

4 Replies

MT Michel T Dallaire November 16, 2004 03:12 PM UTC

I forgot to say it''s in the CalcQuick

AD Administrator Syncfusion Team November 16, 2004 04:33 PM UTC

Your request is noted. Right now we are mimicing Excel which is why you have Or(,,,) and AND(,,,...) functions. Logical expressions do return 0 or 1, so you can use a formula like = (1=1) + (2=2) and get teh result of 2. Sometimes this can be helpful in expressing ''clever formulas''

MT Michel T Dallaire November 16, 2004 07:09 PM UTC

well. that is also useful for bitwise calculation. I have a case which it would be useful for automated robots working with code bar readers. (18 and 2) so does the bit #2 is on in the 18. I use that a lot to put many ON/OFF options in a byte.

MT Michel T Dallaire November 25, 2004 10:38 AM UTC

Hi I''m glad to see that in v3.0.0.19rc you have added the feature of AND and OR. I tried this, and it worked: (17>=16) and 1=1 but if I take calcultation right like VB and even c# understands them: 17>=16 and 1=1 if interpreted like if it was this: 17>=(16and1) =1 and throw an error saying 16and1 is not understood. The AND and OR element should calcultate formula of each sides before evaluating the actual AND or OR. If you want to make "Calculate" bullet proof, that would be wise to see if it can be done. But we are using () and it''s very fine with us. Thank you very much for the good work guys! ;-) I was using an activex for this, now I''m fully dotNET and even more much more powerfull than we were before. It''s awesome.

Live Chat Icon For mobile
Up arrow icon