In this paper we determine completely the structure of linear codes over Z/NZ of constant weight. Namely, we determine exactly which modules underlie linear codes of constant weight, and we describe the coordinate functionals involved. The weight functions considered are: Hamming weight, Lee weight, and Euclidean weight. We prove a general uniqueness theorem for virtual linear codes of constant...