|
Alastair
Either is fine, but it depends on the
logic
For example, if x=1 and y=2 you do one action, but
if x=1 and y <>2 you do a different, you'd do this:
IF X = 1 THEN
IF Y = 2 THEN
-- actions for x=1 and
y=2
ELSE
-- actions for x=1 and
y<>2
ENDIF
ENDIF
But if the actions are ONLY done if both conditions
are met and there is no alternative action, then this is fine
IF X = 1 AND Y = 2 THEN
-- actions
ENDIF
----- Original Message -----
From: Alastair Burr
Sent: Wednesday, August 18, 2004 1:44 PM
Subject: [RBG7-L] - IF... THEN query Is it permissible to combine conditions with AND in the
statement like this:
IF x=1 AND y=2 THEN
...
ENDIF
or is it better to break it into two parts:
IF x=1 THEN
IF y=2 THEN ...
ENDIF
ENDIF I don't remember having any problems in the past
but one particular piece of code seems only to work the second way at the moment
and I can't find any other error.
(This is an error that's been around for a while so
it's not an upgrade problem.)
Regards,
Alastair. ----------------------------------
A D B Burr, St. Albans, UK. ---------------------------------- [EMAIL PROTECTED] ---------------------------------- |
- [RBG7-L] - RE: IF... THEN query Javier Valencia
- [RBG7-L] - Re: IF... THEN query David M. Blocker
- [RBG7-L] - Re: IF... THEN query Alastair Burr
- [RBG7-L] - Re: IF... THEN query Javier Valencia
- [RBG7-L] - Re: IF... THEN query David M. Blocker
- [RBG7-L] - Re: IF... THEN query Alastair Burr
- [RBG7-L] - Re: IF... THEN query Alastair Burr
- [RBG7-L] - Re: IF... THEN query Gunnar Ekblad
- [RBG7-L] - Re: IF... THEN query Alastair Burr
- [RBG7-L] - Re: IF... THEN query Sami Aaron
- [RBG7-L] - Re: IF... THEN query Alastair Burr
