I have some trouble understanding the concept of a function in Vakil's lecture notes.
First, let $X = Spec(A)$ for some ring $A$. A function $f$ is a section in $\mathcal{O}_X(X)$, thus an element of the ring. The value of a function at a point $p \in Spec(A)$ is an element in $A_p$. Now how can I evaluate $f(p)$ ?
Somehow it seems that $f(p) = 0$ iff $f \in p$.
Is $f(p)$ just the image of $f$ under the map $A \to A_p$ ?
Further, Vakil writes 3.2.12 that a function vanishes everywhere iff it is nilpotent. Which is equivalent to it being in all prime ideals. But that doesn't mean that the element $f$ itself is zero. Is that correct ?