Is it possible to pass a record field as a procedure argument? For example, if you have an array of 'StudentRecords' with elements 'Name', 'Age', 'Height', Marks etc, can you sort the records by using - Procedure SortTheArray(NominatedArray:Array; SelectedArraySortField:Field of Array), so that you could sort any array by any of its fields - (Name, Age, Height etc in this case).
Not sure if "Array" by itself would work but if you used Array of StudentRecords, it would limit the scope of the array that could be processed. I can't figure how to nominate the SelectedArraySortField part. Any suggestions?