generalized directive program loop