‎2007 Jul 23 10:29 PM
hi,
its an error if the variable x does not lie in a set of numbers like,
ie, x must be in between 8000 to 8500 or 9000 and 9500
or 10000 and 10500 etc this way there are a 6 set of ranges.
so can any one help how to do this,
i thought of doing like this:
if not ( 8000 < x < 8500 ).
if not ( 8000 < x < 8500 ).
if not ( 9000 < x < 9500 ).
if not ( 10000 < x < 10500 ).
if not ( 11000 < x < 11500 ).
if not ( 12000 < x < 12500 ).
e_flag = 1.
endif.
endif.
endif.
endif.
endif.
endif.
but i doubt will it work, dont know, can some one suggest a proffessional way.
thank you.
‎2007 Jul 24 2:52 AM
IF NOT
( ( 8000 < x < 8500 ) OR
( 9000 < x < 9500 ) OR
( 10000 < x < 10500 ) OR
( 11000 < x < 11500 ) OR
( 12000 < x < 12500 ) ).
e_flag = 1. "<-----X does not fall in any of the range specified. This is a Error Case.
ENDIF.
Regards,
A.Singh.
‎2007 Jul 23 10:32 PM
hi,
ranges : r_value for i.
r_value-low = 8000.
r_value-high = 8500.
append r_value.
repeat this for all set of values.
if not x in r_value.
your logic.
endif.
thanks
Mahesh
Message was edited by:
I Can Solve It
‎2007 Jul 23 10:33 PM
data : begin of x_range,
SIGN TYPE DDSIGN ,
OPTION TYPE DDOPTION,
low type i,
high type i,
end of x_range.
ranges : r_value for i.
x_value-low = 8000.
x_value-high = 8500.
x_value-opt = 'E'.
x_value-sigh = 'BT'
append x_range to r_value.
repeat this for all set of values.
if not x in r_value.
your logic.
endif.
Message was edited by:
I Can Solve It
Message was edited by:
I Can Solve It
‎2007 Jul 24 2:52 AM
IF NOT
( ( 8000 < x < 8500 ) OR
( 9000 < x < 9500 ) OR
( 10000 < x < 10500 ) OR
( 11000 < x < 11500 ) OR
( 12000 < x < 12500 ) ).
e_flag = 1. "<-----X does not fall in any of the range specified. This is a Error Case.
ENDIF.
Regards,
A.Singh.
‎2007 Jul 24 12:27 PM
Hi,
Try this way.
IF NOT ( INT >= 8000 AND INT <= 8500 ) AND
NOT ( INT >= 10000 AND INT <= 10500 ) AND
NOT ( INT >= 11000 AND INT <= 11500 ) AND
NOT ( INT >= 12000 AND INT <= 12500 ).
...
ENDIF.
Regards.
Marcelo Ramos