Page 1 of 1

Need for better Domain types

PostPosted: Fri Apr 17, 2020 11:58 am
I am looking for a way to be to define new numeric types (integer and float) that allow me to set the minimum and maximum (i.e., range) of values allowed for by the type. I would like to also have it include a default value and the units associated with the field. Is it a stereotype? Does one already exist? For example:

Code: Select all
  basetype   : integer := float;
  precision   : integer := 7.6
  minimum  : float := 0;
  maximum : float := 3.14;
  default     : float := 0;
  units        : text      := "radians";