Re: Sequence comparison
- Posted by Lewis Townsend <keroltarr at HOTMAIL.COM> Apr 25, 2000
- 396 views
Hello Michael Nelson, These look useful but I had one question about between() >global function less(object a,object b) > return compare(a,b) = -1 >end function > >global function greater(object a,object b) > return compare(a,b) = 1 >end function > >global function between(object a,object b,object c) > return compare(a,b) > -1 and compare(a,c) < 1 >end function what if b > c? Your function wouldn't work would it? How about this: global function between(object a,object b,object c) return (compare(a,b) > -1 and compare(a,c) < 1) or (compare(a,b) < 1 and compare(a,c) > -1) end function just a thought, Lewis Townsend ________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com