Le 20/12/2020 à 16:02, James Richters via fpc-pascal a écrit :
If I need a bunch of case statements, it's atcually worse than if I just have
separate procedures.
No, in fact the case statement is written only once, in the
implementation of TAxisRecord, and in procedure
Move_It(Axis_Letter:Char); , you just use:
DoSomething(Variable1.Value_from_Letter(Axis_Letter));
This said, I think that Lucas and Stefan ideas with "AxisName =
(X,Y,Z,A,B,C);" are better than mine,
because compilation will fail on a bad axis name, for example a typo
with Axis[U].
_______________________________________________
fpc-pascal maillist - [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal