Does Xojo have any constants representing the smallest and largest values that the different number types can have?
Like MaxDouble, MaxInt, MinSingle, …
Not that I am aware of
Thanks.
I was going to set variables to the highest and lowest possible numeric values and use them to find the lowest and highest numbers in a list. So as to not worry about picking a bad starting number, I packed the numbers into an array and sorted instead.
I saw the Min and Max Math functions, but the docs and some testing indicate these only take a manually entered list.
I don’t think there are constants provided, but it wouldn’t take long to create some:
Integer
Integer values range from -2,147,483,648 to 2,147,483,647 (32-bit apps) or -9,223,372,036,854,775,808 to +9,223,372,036,854,775,807 (64-bit apps).
Double
- The maximum value of a Double is: ±1.79769313486231570814527423731704357e+308
- The minimum value towards zero is: ±4.94065645841246544176568792868221372e-324
Double — Xojo documentation