Any interval in R is one of eight types: (-oo,a], (-oo,a), (a,b), (a,b], [a,b), [a,b], [b,oo), or (b,oo). That is, there are four types of bounded intervals of reals and four types of unbounded intervals of reals. How does what you wrote prove that if A is a connected set in R the A is one of those types?