Note on the Theory of Gratings