Optimisation methods in Pascal