This paper describes the algorithms and theory behind a new code for vector Sturm-Liouville problems. A new spectral function is defined for vector Sturm-Liouville problems; this is an integer valued function of the eigenparameter λ which has discontinuities precisely at the eigenvalues. We describe numerical algorithms which may be used to compute the new spectral function, and its use as amiss-distance function in a new code which solves automatically a large class of regular and singular vector Sturm-Liouville problems. Vector Sturm-Liouville problems arise naturally in quantum mechanical applications. Usually they are singular. The advantages of the author's code lie in its ability to solve singular problems automatically, and in the fact that the user may specify the required eigenvalue by its index.