If at first you don't succeed...
Chemistry professor David O'Hagan, of St Andrew's University, told pupils that while at Holyrood, his ambitions to study medicine were thwarted simply because he was a "very average" student.
Admissions of fallibility were a common theme among former pupils who were visiting the school last week to talk to pupils - a group that also included the chairman of Sainsbury's Bank, one of Scotland's most celebrated businessmen, and leading figures in comedy, dentistry and local government.
Willie Haughey, whose City Refrigeration was voted Europe's fastest-growing company in 2004, confessed that he had thought about giving up during the business's tough early years.
Benny Higgins, chairman of Sainsbury's Bank and an HBOS executive director, recalled that he was not quite good enough to make it as a profes-sional footballer.
Yet what also linked the ex-pupils was a dogged determination to do well, even after setbacks. Equally, all were driven by an intrinsic interest in the career they had chosen.
"If you set up in business and your driving ambition is to become a millionaire, you'll probably fail," said Mr Haughey. "If you set out to do the very best you can, there is a right good chance you will become a millionaire."
The event was organised with help from www.achieversuk.com, a website that highlights the success of former pupils at Scottish state schools. About half of Scotland's state schools are represented on the site.
Director Patrick Gaffney said it was part of private schools' culture to highlight the achievements of former pupils, but that state schools were traditionally far less likely to do so.