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
1
vote
2 answers

"_" is not convertible to Int32 - Swift

Getting this error and don't understand why. This line below works. Note that both settingVersion and settingRelease are Strings: let isInserted = sharedInstance.database!.executeUpdate(sqlStatement, withArgumentsInArray:…
Edward Hasted
  • 3,201
  • 8
  • 30
  • 48
1
vote
2 answers

Failed to convert parameter value from a String to a Int32 for DateTime

I have a C# form linked to an SQL database, and for one of the columns I wish to insert the current date each time a new row is added. I am baffled because at one point this code was doing exactly what I wanted, and then after changing a few things…
anesthetic
  • 193
  • 2
  • 18
1
vote
2 answers

Swift SQLite SQL Count

In a Swift iOS 8 project with SQLite, I'm trying to get the number of rows in a table using the SQL COUNT function. From the examples I found in C, I came with this code: var nRows: Int32 = 0 func getNquestions() { let querySQL = "SELECT…
Belerofonte
  • 45
  • 2
  • 4
1
vote
1 answer

LINQ to Entities does not recognize the method 'Int32 Parse(System.String)' method,

I am using Entity Framework, and I have a line of code that convert string field (id)to int and compare with a number students = students.Where(s => (Int32.Parse( s.id)>5555)); Whenever I try to run it I receive rhis error. "LINQ to Entities does…
1
vote
2 answers

Solve:Value was either too large or too small for an Int32

I am passing query string and the url is as follows-> http://localhost:1086/Web/EditMobile.aspx?sno=2. But when i try to enter the url as follows,localhost:1086/Web/EditMobile.aspx?sno=23424324423432424 , i get the following error->Value was either…
GethuJohn
  • 233
  • 2
  • 11
  • 23
1
vote
2 answers

Median Maintenance Algorithm - Same implementation yields different results depending on Int32 or Int64

I found something interesting while doing a HW question. The howework question asks to code the Median Maintenance algorithm. The formal statement is as follows: The goal of this problem is to implement the "Median Maintenance" algorithm (covered…
lopezbertoni
  • 3,551
  • 3
  • 37
  • 53
1
vote
2 answers

Is it possible to use Convert.ToInt32(double) and make it choose the smallest value?

Is it possible to use Convert.ToInt32(double) and make it choose the smallest value? I've read the examples in msdn, it converts a double to int using the closest value, which means that if i have a double equal to 2.9 it would set the int to 3. Is…
ng80092b
  • 621
  • 1
  • 9
  • 24
1
vote
1 answer

Reading and printing 32 bit integers in assembly

Helo there! I have a problem and i hope somebody can help me:) I need 2 macros: one to read and the other one to print a 32 bit integer I have a project for monday and I'm out of ideeas :( This is what I have until now: Macro for reading: reads…
Alex Torge
  • 31
  • 7
1
vote
1 answer

Missing a Zero (0) from a parameterised value of type Int32 during Runtime

I have a function that takes 3 parameters, username(string), password(string) and an ID(Int32) for that i have just passed the parameter like this newresult.dataSet = postCommands.getCustomerBalance("customer1","password1234", "02070481"); but the…
Joker
  • 830
  • 2
  • 14
  • 30
1
vote
1 answer

Ascii Bytes Array To Int32 or Double

I'm re-writing alibrary with a mandate to make it totally allocation free. The goal is to have 0 collections after the app's startup phase is done. Previously, there were a lot of calls like this: Int32 foo =…
Michael Covelli
  • 2,113
  • 4
  • 27
  • 41
1
vote
2 answers

Converting something like 0x0EB8 from a string to an int32 type?

I need to take a vendor ID from a user in the form of an int32, and they usually look something like this. 0x0EB8 I can write this as code int32 vid = 0x0EB8; That works just fine. But I need to get it from the user in the form of a string. And…
BurntCandy
  • 55
  • 1
  • 9
1
vote
2 answers

Assign large type variable to a smaller types array

I am just wondering how this works, and to be clear as to whether it actually does work. If you have a 32 bit int and an 8 bit int array of size 4. Can you assign the 32 bit int to the 0th index in the 8 bit int array and effectively have the same…
Tom
  • 103
  • 10
1
vote
4 answers

How to calculate with text boxes and skip empty text boxes?

I have to count with money and I have created some textboxes where the user can input how many 1 euro coins he has. (and so for 2 euro, 5 euro, etc) Now I want to calculate to total, but if a textbox is empty, you can't count whit it. I have tried…
Wouter
  • 575
  • 6
  • 19
1
vote
1 answer

BinaryWriter.Write(Int32)

I have a file that containt struct like these : public struct index { public string word; //30 bytes public int pos; //4 bytes }; For the word, I make sure I extend it to 30 bytes before writing it and the pos I write…
ESD
  • 675
  • 2
  • 12
  • 35
1
vote
3 answers

Translating Int32 into ushort and back again

I am attempting to devise a system for packing integer values greater than 65535 into a ushort. Let me explain. We have a system which generates Int32 values using an IDENTITY column from SQL Server and are limited by an in-production client API…
cfeduke
  • 23,100
  • 10
  • 61
  • 65