Surely the two ranges 0-2,2.5-4.5 are a single logical range 0-4.5??? The range concept becomes a bit iffy once you stop using integers. Any two numbers will constitute a range - it just depends on your step size.
Heh, thanks. Too true. I therefore implement your definition
via the replacement:
if ( $_ - $end_points[ 1 ] == 1 ) { $end_points[ 1 ]++; }
goes to
if ( $_ - $end_points[ 1 ] <= 1 ) { $end_points[ 1 ] = $_; }
In reply to Re: Re: Critique yet another List-to-Range function
by scott
in thread Critique yet another List-to-Range function
by scott
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |