A formulation of a gauge theory with discretized spacetime. Matter fields are assigned to sites and gauge-group elements to links between nearby sites. Products of link variables around closed paths provide gauge-invariant quantities. This structure preserves the local gauge symmetry while making nonperturbative numerical calculations possible. Physical predictions require control of finite spacing, finite volume and statistical errors rather than treating one finite grid as the continuum theory.