Recent

Author Topic: how to check type of value  (Read 1225 times)

VisualLab

  • Hero Member
  • *****
  • Posts: 573
Re: how to check type of value
« Reply #15 on: October 18, 2024, 10:01:09 am »
Ordinal is a family, so integers already belong to ordinal, as do enumerations to some extend.(pred(), succ()).
The main reason for <T:ordinal> is that you can then only specialize to one of the family members, like byte or integer.
This family is comparable to the class or record family. My request is well received, but has alas no urgency.
I believe it was Sven who suggested there could be more families added, maybe a numerical family or a family of float types etc. Or sets since sets are also a family.

Yes. But I didn't mean a division of ordinal types, but rather different groups of them (understood more broadly or more narrowly). Sometimes it would be useful to define the most general ordinal type, which would include integer, boolean, enumerated, and range types. And other times only integers or only enumerations.

 

TinyPortal © 2005-2018