  We present an efficient way to compute diagonal and off-diagonal n-point
correlation functions for quantum spin-systems within the loop algorithm. We
show that the general rules for the evaluation of these correlation functions
take an especially simple form within the framework of directed loops. These
rules state that contributing loops have to close coherently. As an application
we evaluate the specific heat for the case of spin chains and ladders.
