According to the classroom notes "Uniformly Continuous Linear Set" in American Mathematical Monthly, Vol. 62. No. 8(Oct., 1955) pp. 579-580, Author: Norman Levine, DOI: 10.2307/2307254.
In the proof of theorem 1,how to verify that f is continuous while not uniformly continuous itself?
thanks
Relevant part of the proof (in this proof $E$ is a linear set of points):
If $E$ is not closed, there is a point $c$ which is a limit point for $E$, but which does not belong to $E$. Then, without loss of generality, there exists a sequence of points $p_i$ in $E$ such that $p_i<p_{i+1}$ and $\lim p_i=c$.
Define $$f\equiv \begin{cases} 1 & \text{for }x=p_{2i-1} \\ 0 & \text{for }x=p_{2i} \end{cases} $$ and linear between $p_i$ and $p_{i+1}$, and let $f(x)=1$ for $x>c$ and for $x\le p_1$. It is easy to verify that $f(x)$ is continuous on $E$, but not uniformly continuous on $E$.
A piecewise linear function is continuous - this shows that the function $f$ is continuous at each point $x<c$, $x\in E$. For $x>c$ the function $f$ is constant. Thus we have continuity on $E$ (=continuity at each point $x\in E$).
If the function were uniformly continuous on $E$, then a uniformly continuous extension of $\overline E$ would exists; see Continuous extension of a uniformly continuous function from a dense subset.
But no extension of the function $f$ can be continuous at the point $c$, since it attains the values 0 and 1 arbitrarily close to the point $c$.
It can be relatively easily shown that it is not uniformly continuous directly from the definition - if you look at the consecutive points from the sequence $p_i$, you get arbitrarily close points with "jump" of height 1 between their values.