A statistic is a function of random variables, so it is also a random variable. Suppose we have a collection $X = (X_1, X_2, \dots, X_n)$, where $X:\Omega \to \mathcal{X}^n$. There are two common notations for a statistic:
$$ S = r(X_1,X_2, \dots, X_n) $$
where $r: \mathcal{X}^n \to \mathbb{R}$. In this context, the definition of the function $S$ is clear as the composition of the functions $r$ and $X$, and the definition $S: \Omega \to \mathcal{S}$ arises naturally where $S(\omega) = r(X_1(\omega), \dots, X_n(\omega))$.
However an alternative notation seen quite often is
$$ S(X_1,X_2, \dots, X_n) $$
What is the formal interpretation of this notation? For instance, what is $S(X_1,X_2, \dots, X_n)(\omega)$? What is the mathematical object $S$?