Rational/meromorphic functions on a scheme

In EGA (IV, §§ 20 – 21), the sheaf of meromorphic functions $\mathscr{M}_X$ on a ringed space $(X, \mathscr{O}_X)$ is defined as the sheaf associated to the presheaf that associates to an open $U \subset X$ the localization of the ring $\Gamma(U, \mathscr{O}_X)$ at its regular elements. There is a canonical homormophism $\mathrm{div} : \Gamma(X, \mathscr{M}_X^*) \to \mathrm{Div}(X) = \Gamma(X, \mathscr{M}_X^*/\mathscr{O}_X^*)$ that associates to a regular meromorphic function a (Cartier) divisor; and there is a homomorphism $\mathrm{cyc} : \mathrm{Div}(X) \to Z^1(X)$ to the group of 1-codimensional cycles which is defined for positive divisors $D \in \mathrm{Div}_+(X)$ as $$\mathrm{cyc}(D) = \sum_{x \in X^{(1)}} \mathrm{long}_{\mathscr{O}_{X,x}} (\mathscr{O}_{D,x}) . \overline{\{ x \}}$$ (and extends in a unique manner to the whole group $\mathrm{Div}(X)$).

When $X$ is a locally Noetherian scheme, Vakil (6.5.5) defines the ring of rational functions on $X$ as the inductive limit of the rings $\Gamma(U, \mathscr{O}_X)$ along the family of open sets $U \subset X$ containing the associated points. He notes that when $X$ is integral, this ring is indeed isomorphic to the traditional "function field", i.e. the stalk $\mathscr{O}_{X,\xi}$ of the structure sheaf at the generic point $\xi$. In Fulton's "Intersection theory" (§§ 1.4 – 1.5), for an integral scheme $X$, he defines the 1-codimensional cycle associated to a rational function $r \in K(X)^*$ by $$[\mathrm{div}(r)] = \sum_{x \in X^{(1)}} \mathrm{ord}_x(r) . \overline{\{x\}}$$ where $\mathrm{ord}_x : K(X)^* \to \mathbb{Z}$ is the homomorphism defined by $$\mathrm{ord}_x(r) = \mathrm{long}(\mathscr{O}_{X,x}/(a_x)) - \mathrm{long}(\mathscr{O}_{X,x}/(b_x))$$ where $a_x/b_x \in \mathrm{Frac}(\mathscr{O}_{X,x})$ is the fraction corresponding to $r$ under the isomorphism $K(X) \stackrel{\sim}{\to} \mathrm{Frac}(\mathscr{O}_{X,x})$. (I believe I remember reading about such an isomorphism in Liu's book, but I don't have it with me at the moment so I can't be sure.)

I am under the impression that the terms "rational function" and "meromorphic function" are used more or less interchangeably (I guess the former is more popular in modern literature). Also I believe that Grothendieck's definition is a generalization of the second one, but I can't quite understand why. Further I would like to understand how the definitions of the divisor associated to a rational function coincide.

-
For locally noetherian schemes, the stalk of $\mathcal K$ at $x$ is isomorphic to $\mathrm{Frac}(O_{X,x})$ (total ring of fractions). – user18119 Jan 21 '13 at 9:04

Grothendieck's definition doesn't even make sense because the "presheaf" that you mention in your second line is not a presheaf at all: non zero-divisors may restrict to zero-divisors when passing from $U$ to a smaller open subset $V$.
This was noticed by Kleiman in 1979, in a celebrated four-page article Misconceptions About $K_X$ whose theme is close to your question and will certainly interest you.
Thank you for sharing this important paper! However, my question still stands, with Kleiman's definition of $\mathscr{M}_X$ ($K_X$). – Adeel Jan 20 '13 at 13:54