[fpc-pascal] Selecting Records with a variable

wkitty42 at windstream.net wkitty42 at windstream.net
Sun Dec 20 02:25:49 CET 2020


On 12/19/20 7:16 PM, James Richters via fpc-pascal wrote:
> 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?

do you need to show only one at a time or are you looping through and printing 
all of them each time?

if you need them all every time and if you are looping through them, don't... 
just call ShowAxis and writeln all of them one after the other...

Procedure ShowAxis;
begin
   writeln(AxisValue.X);
   writeln(AxisValue.Y);
   writeln(AxisValue.Z);
   writeln(AxisValue.A);
   writeln(AxisValue.B);
   writeln(AxisValue.C);
end;


-- 
  NOTE: No off-list assistance is given without prior approval.
        *Please keep mailing list traffic on the list where it belongs!*


More information about the fpc-pascal mailing list