The best way to explain what I'm hoping to do is by example... Say I have this record:
Type Axis_Record = Record X,Y,Z,A,B,C : Double; End; Var AxisValue : Axis_Record; Instead of this: Procedure ShowAxis(Axisletter:Char); Begin If AxisLetter = 'X' Then Writeln(AxisValue.X); If AxisLetter = 'Y' Then Writeln(AxisValue.Y); If AxisLetter = 'Z' Then Writeln(AxisValue.Z); If AxisLetter = 'A' Then Writeln(AxisValue.A); If AxisLetter = 'B' Then Writeln(AxisValue.B); If AxisLetter = 'C' Then Writeln(AxisValue.C); End; I would rather have something like this: Procedure ShowAxis(Axisletter:Char); Begin Writeln(AxisValue.AxisLetter); End; Is there some syntax that would work to select the correct record based on the variable so I can avoid having all the If statements? James _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal