I want to define a percentage type.
TPrecent = 0 .. 100;
works fine, but I can only assign integers to it an dwoudl also like to assign floats.
How can I do that?
I want to define a percentage type.
TPrecent = 0 .. 100;
works fine, but I can only assign integers to it an dwoudl also like to assign floats.
How can I do that?
TPercent is an integer sub-range. You cannot create a sub-range that is a floating point underlying type.
Ranges can only be integer ordinal types. You will need to use a float variable and validate the value yourself.