Hi everyone!
I want to talk about **_High_** proc and the way it confused me ( several times
already )
The issue is that usually I use ( and as many others, I believe) **_High_** to
get last index in a seq or array. It's fine. But confusion comes with ordinals.
var index = 600_000
var last = index.high # expect to see 599_999, but get the highest possible
value of an ordinal
Run
YES, I read the doc for the **_High_** and I clearly see the description about
the highest possible value of an ordinal.
Run
But over and over again I get into this pitfall cause logically I don't get why
in a heck I get 9223372036854775807 for 600_000.high It's just not intuitive :)
high(int) # get the highest value for ordinal type int, I get it, elegant
and smart, agree
INT_MAX # something like that I used in C#, not that smart as example
above, but ok
high(600_000) # confusion, returns 9223372036854775807
Run
Let me know if I missed something / didn't understood