impostare la grandezza degli interi fa risparmiare tempo anche con powershell?
I was looking to convert some string data into integers – the data was bytes & I needed it in GB. The value I needed was buried in the middle of a string so I needed to do some string processing. Some other conditions forced me to use the Parse method of the integer class
Lets say I get a number like 2147483169 back in the data & I need to divide by 1gb
£> [int]::Parse(“2147483169”) / 1gb
1.99999955389649
I’ve put the string value directly in here rather than the complicated string processing I was actually using.
The point came when I realised that I could have much bigger numbers than 2Gb so what was the maximum I could work with
£> [int]::maxValue
2147483647
£> [int]::maxValue / 1gb
1.99999999906868
OK thats not enough. The standard [int] is 32bits & I know its big brother has 64 bits so how…
View original post 73 altre parole
Discussione
Non c'è ancora nessun commento.