Private ranges As rangeObject 'a small standard class with 50 lines of code
ranges.Initialize(.00000001) 'to define equality of double precision numbers
'For string ranges, comma and ~ are reserved characters (as legibility tradeoff) all values are trim(med)
Log(ranges.Set("a~c, da~dz, cat").Contains("db")) 'true
Log(ranges.Set("a~c, da~dz, cat").Contains("cat")) 'true
Log(ranges.Set("a~c, da~dz, cat").Contains("d")) 'false
'For numeric ranges, min and max are -infinity and infinity
Log(ranges.Set("min~40, 100~200, 500~max, 42").Contains(-.25)) 'true
Log(ranges.Set("min~40, 100~200, 500~max, 42").Contains(42)) 'true
Log(ranges.Set("min~40, 100~200, 500~max, 42").Contains(43)) 'false