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
0
votes
3 answers

C++: Setting a uint32 to an int32 (negative value)

I am debating whether I can get rid of a compiler warning or not. The warning comes from comparing an uint32 to -1. Now just from glancing at it this seems like an unwise thing to do since uint32 should never be negative yet I didn't write this…
TeeseCaprice
  • 55
  • 1
  • 13
0
votes
2 answers

If else statement using "System.Convert.ToInt32" not working

I am trying to display a particular string using an if else statement based on the value of a date/time object. I am using a formula editor which checks for syntax and I get no problems, however when the formulas is parsed in the application I get…
Aus Gamer
  • 1
  • 1
0
votes
0 answers

MongoDb: Cannot deserialize a 'ObjectId' from BsonType 'Int32'

I create simple class: public class User { // [BsonRepresentation(BsonType.ObjectId)] public ObjectId _id { get; set; } [BsonRepresentation(BsonType.String)] public String Name { get; set; } …
Admiral Land
  • 2,304
  • 7
  • 43
  • 81
0
votes
1 answer

why my wpf application get value -2097152 when capture Network card speeds?

I have developed an application which one capture network card speeds,i use below code to get data: NetworkInterface nic = nicArr[0]; IPv4InterfaceStatistics interfaceStats = nic.GetIPv4Statistics(); Int64 bytesSentSpeed =…
zhang mike
  • 65
  • 1
  • 9
0
votes
0 answers

Matlab structure with int32 and float values

I created a function that generates a structure to store parameters acquired during a simulation. Some parameters are int32, while other (actually, most of them) are float. The structure is generated correctly (no errors during execution) but for…
Bianca
  • 149
  • 2
  • 10
0
votes
1 answer

Swift 3 - convert Int32 to Int

Using Swift 3 and am having problems comparing an Int32 and Int in an IF statement. // myIntFromCoreData is an Int32 // kMyConstant is an Int if myIntFromCoreData == kMyConstant // error: Binary operator "==" cannot be applied to operands of type…
Vee
  • 1,821
  • 3
  • 36
  • 60
0
votes
1 answer

How to get 4 bytes of data (uint8_t) into a variable of type uint32_t

I've been working with Cypress BLE PSoC 4200, and I've set up my GATT database to send int32 data packets to my iPhone. However, you can only write to the GATT database with uint8 pieces of data. So I wrote the following to take this int32 voltage…
0
votes
0 answers

Most efficent way of represent and use fields of native numeric types in typescript for browser and nodejs

I want to write a library in typescript that serialize/deserialize native numeric types, among others data types. The idea is to have a class as it: class Rectangle { x: i32 y: i32 width: u32 height: u32 } And serialize it to…
0
votes
2 answers

How can I preempt the attempted assignment of DBNull to an int?

The following code: foreach (DataRow fillRateDataRow in dtFillRateResults.Rows) { . . . var frbdbc = new FillRateByDistributorByCustomer { ShortName = fillRateDataRow["ShortName"].ToString(), Unit =…
B. Clay Shannon-B. Crow Raven
  • 8,547
  • 144
  • 472
  • 862
0
votes
2 answers

loading csv to C# System.ArgumentException

I have the following code: OleDbConnection connection = new OleDbConnection(string.Format(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0}; Extended Properties=""text;HDR=Yes;FMT=Delimited"";", Path.GetDirectoryName(ofd.FileName))); OleDbCommand…
Wai Hung
  • 49
  • 10
0
votes
3 answers

Why does every line in the .txt-file output end with 'System.int32'? C#

C#, Console Application, Virtual Studio 2015, Paralelles: Windows 8.1. The code is as follows: class txt_program { public void txt() { /* 0 */ int[] M_array_0 = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; …
0
votes
1 answer

Positive addition operations producing a negative number

I am writing a script to take a series of number from a csv file and total them. I have extracted the values from the csv into a List and am looping over that to add them together. The numbers are millisecond representations of each minute…
3therk1ll
  • 2,056
  • 4
  • 35
  • 64
0
votes
1 answer

Binary, Int32, and Hex conversions inquiry

The following code is a work-in-progress that I am also taking time with to try and learn some more about converting between bits, hex, and Int; A lot of this is obviously repetitive operations since we're doing the same thing to 7 different…
Alex Watts
  • 537
  • 8
  • 27
0
votes
1 answer

Integer overflow with package `IRanges` in `R`

Problem I am using the package [IRanges][1] and am in need to accurately code for very long sequences that overpass 2^31 by about 10-fold. From the following, it seems that IRanges uses int32 ##### INSTALLATION FROM SRC CODE ###### ## try http:// if…
Remi.b
  • 17,389
  • 28
  • 87
  • 168
0
votes
1 answer

Converting String to Int32 Trouble

I'm having trouble converting an string to Int32 when calling it. This is what I'm struggling with. public static int GetProgramLength() { Console.WriteLine("Please enter program length:"); return Int32.TryParse(Console.ReadLine); } Its…