Questions tagged [int32]

int32 is a datatype that represents an integer and is coded on 32 bits in memory.

int32 is a datatype that represents an (a whole number, not a fraction) and is coded on 32 bits in memory. Unlike its counterpart which is , int32 can be used to store positive and negative integers, of values between -231 to 231 - 1.

187 questions
3
votes
3 answers

Convert a string in a label to int not working properly

I have the following code: int a = Int32.Parse(weight.Text); double b = 0; if (this.wcf.SelectedItem == weighing) { b = (a * 1.03) / 1000; wll.Content = b.ToString(); } weight is the name of a TextBox and in this TextBox where the input is…
3
votes
2 answers

How to specify data type for hashtable?

It seems PowerShell hashtable (@{}) is map of string→string by default. But I wish that my value type is Int32 so that I could do calculation on it. How could I specify the type information when declaring a hashtable variable?
vik santata
  • 2,989
  • 8
  • 30
  • 52
3
votes
1 answer

Neon casting issue

I am new to the NEON intrinsics (A9 processor). I want to convert uint8x16_t to int32x4_t value . I tried to use the vreinterpret_s32_u8 to do so which did not work . Can anyone please guide me? Really appreciate your help .
user3476225
  • 240
  • 5
  • 14
3
votes
1 answer

int32 storage in memory

I have a question about int32 storage (c#). 32 bits means that the biggest number for int is 2^32. 2^32 = 4294967296, if you divide it by 2 you get the maximum value for an int32 : 4294967296 / 2 = -2147483648 to 2147483648 So I thought half of…
Julian Herbold
  • 537
  • 9
  • 20
3
votes
8 answers

int or uint or what

Consider this int i = 2147483647; var n = i + 3; i = n; Console.WriteLine(i); // prints -2147483646 (1) Console.WriteLine(n); // prints -2147483646 (2) …
Asad
  • 21,468
  • 17
  • 69
  • 94
2
votes
9 answers

Why can't I pass a large value as an Int32?

I have a number: 94,800,620,800 Float is 4-byte data-type. Int32 is also 4-byte data-type. float f = 94800620800; // ok Int32 t = 94800620800; // error Please explain this problem. Why I get a error when using Int32. Why I can use this number for…
Leo Vo
  • 9,980
  • 9
  • 56
  • 78
2
votes
1 answer

Can't Get Powershell to assign an array over a certain size

So, I'm trying to create a powershell script that "benchmarks" the speed of GPG using various size files. The part in specific that is causing me trouble is this: 1 $temppath="$($env:Temp)\" ... 4 Measure-Command {$bytes= 10000MB 5…
Shinaolord
  • 157
  • 6
2
votes
1 answer

How to convert list of binary values to int32 type?

I have a list of binary numbers in little-endian format in MATLAB workspace, and I want to convert them to int32. a is a double vector of zeroes and ones, like so: a = [0 0 0 1 1 0 0 1 1 1 1 0 1 0 1 0 0 0 0 1 1 0 0 0 1 1 1 1 1 0 0…
B. Z.
  • 129
  • 11
2
votes
3 answers

Visual C++ 2010 -> Window Form. How to convert string to int?

Hey! I have textBox with text like "12:30" and this code textBox -> Text -> ToString() -> Split(':')[1] It return "30" as string. And I want convert it to Int. How? I founded function like Convert::ToInt32() etc, but it doesnt work for my c++…
MegaFill
  • 25
  • 1
  • 1
  • 5
2
votes
1 answer

Unpack signed int32 little-endian in PHP

I have a binary file that I'm trying to parse. A little part of the file has a set of coordinates (latitude and longitude). A small example could be as follow: $data = "64DA7300 0CD5DFFF"; And I'm trying to see the integers but I have no luck…
user143
  • 25
  • 3
2
votes
2 answers

How do you convert a hex to signed float in Swift? Works fine with positive number but doesn't work on negative

let hexString = "0x42f9b6c9" let toInt = Int32(truncatingBitPattern: strtoul(self, nil, 16)) let toFloat = Float(bitPattern: UInt32(self)) RESULT: 124.857 let hexString = "0xc2f9b6c9" let toInt = Int32(truncatingBitPattern: strtoul(self, nil,…
user
  • 623
  • 6
  • 6
2
votes
1 answer

How do I distinguish a rune and int32 values in a typeswitch?

Having the following code var v interface{} v = rune(1) switch v.(type) { case int32: fmt.Println("int32") case rune: fmt.Println("rune") } I get a compilation error tmp/sandbox193184648/main.go:14: duplicate case rune in…
user7610
  • 25,267
  • 15
  • 124
  • 150
2
votes
1 answer

How to convert long string number value into integer

what I have to use instead ToInt32, to convert long string number value "10000000001" into integer, so this way is limited to a ten-digit number: string str1 = "1000000000"; string str2 = "1000000000"; int a = Convert.ToInt32(str1); …
nikorio
  • 671
  • 4
  • 16
  • 28
2
votes
1 answer

What to type in for int32 pixelFormat in Swift?

I'd like to use the function CGDisplayStreamCreateWithDispatchQueue. The documentation tells me to use the following possible values for "pixelFormat": (The parameter needs to be an Int32) The desired Core Media pixel format of the output frame…
Thomas
  • 23
  • 2
2
votes
4 answers

Why am I printing out 'System.Int32[]' instead of my array of numbers?

I am trying to print out my array of numbers that I have assigned to a particular array. My algorithm for choosing numbers consists of choosing a random number that is not a duplicate and storing it inside the array. Pretty simple really, but I…
bsd u
  • 77
  • 1
  • 6