nested loop pascal