Sir Gerald was a Sheriff from 1976 to 1999 and a Temporary Judge at the High Court until June 2004. He was Professor of Scots law at Edinburgh University from 1972 to 1976 and Head of Department of Criminal law and Criminology there from 1965 to 1972. He practised as an Advocate from 1953 to 1959 and was Procurator Fiscal Depute from 1960 to 1965.