‎2010 Jul 15 3:59 PM
Good morning, people of the forum ...
I have the following question ...
Is there any sentence that tells me if a range is contained within another range of the same type??
Thanks
‎2010 Jul 15 4:07 PM
‎2010 Jul 15 4:05 PM
well, if the ranges are same you can always check
if range1[] = range2[].. else you will have to loop over one range and read the values from the other range to compare.
‎2010 Jul 15 4:07 PM
‎2010 Jul 19 7:00 PM
I think the second answer is more appropriate ...
But I do not think I expressed myself very well ...
What I really want is to know if there is intersection between two ranges of the same type (not necessarily equal).
For example, for two ranges of type DATE, if the first range is from 01/05/2010 to 31/05/2010 and the second range is from 05/15/2010 until 15/06/2010 (in format dd/MM/yyyy), the result should be TRUE, but if the ranges do not intersect, the result should be FALSE.
Is this possible??
‎2010 Jul 19 7:10 PM
Well you can try this logic
loop at r1.
while r1-low < = r1-high.
if r1-low in r2.
exists.
exit.
endif.
r1-low = r1-low + 1.
endif.
endwhile.
‎2010 Jul 19 9:06 PM
You mean... evaluate each value of r1 in r2???
Yeah... I can do that, but I thought there was a simpler and more abreviated method...
Well, I think I'll take your suggest..
Thanks