  Starting from a semiclassical quantization condition based on the trace
formula, we derive a periodic-orbit formula for the distribution of spacings of
eigenvalues with k intermediate levels. Numerical tests verify the validity of
this representation for the nearest-neighbor level spacing (k=0). In a second
part, we present an asymptotic evaluation for large spacings, where consistency
with random matrix theory is achieved for large k. We also discuss the relation
with the method of Bogomolny and Keating [Phys. Rev. Lett. 77 (1996) 1472] for
two-point correlations.
