Subject | Re: [ib-support] logical operations |
---|---|
Author | Paul Reeves |
Post date | 2001-03-21T15:33:26Z |
Jörg Schiemann wrote:
it looks to me as if you have answered your own question.
In Stored Procedure language
if ( (expression1) AND (expression2) ) then
...
is equivalent to
if (expression1 && expression2)
...
in C.
Paul
--
Paul Reeves
http://www.ibphoenix.com
taking InterBase further
>I think you will have to be even clearer about what you want to achieve, because
> > > Hi,
> > >
> > > how do I perform logical operations within SP?
> > >
> >
> > You evaluate expressions by enclosing them in parentheses:
> >
> > if (AVAL='XYZ') then
> >
> > Or do you mean something else by logical operations?
>
> I mean the logical operations AND, OR, NOT.
> In C you use && , || , !
>
> i.e.
> 1 AND 0 = 0
> 1 AND 1 = 1
> 1 OR 0 = 1
> 1 OR 1 = 1
>
it looks to me as if you have answered your own question.
In Stored Procedure language
if ( (expression1) AND (expression2) ) then
...
is equivalent to
if (expression1 && expression2)
...
in C.
Paul
--
Paul Reeves
http://www.ibphoenix.com
taking InterBase further