Sebastien and Utkarsh, Thanks for both of your suggestions. I have now looked at them and they both look pretty good to me. I'll practice with these solutions and see which one I like best. Kind Regards, Robert -- Science personalities series: calculus and charity http://en.wikipedia.org/wiki/Maria_Gaetana_Agnesi