Why must we have $0<|x-p|$ in the definition of function limits? The definition of a function limit is given in my lecture notes as:
$$f(x)\rightarrow L \text{ as } x\rightarrow p \text{ if } \forall \varepsilon>0, \exists \delta>0 \text{ such that }\forall x,\color{red}{0<|x-p|}<\delta \Rightarrow |f(x)-L|<\varepsilon$$
Why do we demand $x\neq p$?
In my lecture notes I also note that the definition for continuity of a function at $p$ stipulates only that $|x-p|<\delta$ and not this additional inequality - why the difference?
 A: An example could be the function
\begin{align*}
f:[0,1]\to[0,1] \quad f(x) = 
\begin{cases}
0 & \text{if }x\in [0,1) \\
1 & \text{if }x = 1 
\end{cases} \: .
\end{align*}
The idea is that the function is constantly zero on the half-open interval $[0,1)$, and then suddenly jumps up to $1$ at $x=1$. The above definition allows one to determine that the limit of the function at $x=1$ is $L=0$, but if we did not ensure $x\neq p$, we could never find a $\delta$ small enough to give a unique limit, and thus a limit would not be defined.
This is a way of showing that the above function is not continuous - indeed, a function is continuous at $p$ if and only if the limit is defined and agrees with $f(p)$. This is then contained in the definition if you leave out the inequality $0<|x-p|$.
A: Exactly as Mr Tim said a function need NOT ne defined at p in order to have existence of the limit. For instance domf=(-1,0)U(0,1) and f(x)=0 on the domain. Then clearly
$\displaystyle \lim_{x \to 0}f(x)$=O despite the fact that the function is not defined at O. The value at p has NOTHING to do with the limit and its existence!
