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
4
votes
6 answers

Difference between int and System::Int32

As I'm writing applications using C++ .NET framework I want to ask a question. When I am writing code exactly for "for loop" I always use this style of coding: for( int i=0; i
Viktor Apoyan
  • 10,655
  • 22
  • 85
  • 147
4
votes
1 answer

Are there any issues with int32_t to NSInteger casting?

I am creating a bitmask for the iOS using the data type int32_t. This is then set to a variable that accepts an NSInteger. This throws no compile time errors as expected, but I was wondering - is there was some way that this could cause run-time…
AndrewKS
  • 3,603
  • 2
  • 24
  • 33
4
votes
0 answers

How to check the NSNumber is boolean or int32?

I have declared one variable as NSNumber and assigned bool true. Then I have declared another NSNumber and assigned int 1. When I try to retrieve the datatype of both variables, both returns as Int. This issue happened only in iPhone 5 and lower…
Who am I
  • 83
  • 3
4
votes
1 answer

How does Int32 overloads operators?

I quickly go through Int32 struct definition, and I do not find any overload to operators like + - * /, but for String class, we can directly find them. How does Int32 implement such feature?
Bargitta
  • 2,266
  • 4
  • 22
  • 35
4
votes
2 answers

Golang: Combine two numbers

I feel quite stupid asking this but how can I archive the following in GO? Let's say I have two int32 which both have the value 33. How can I combine them into one int32 with the value 3333 instead of 66?
Backslash
  • 343
  • 5
  • 12
4
votes
6 answers

Determine if a decimal can be stored as int32

I am doing some custom serializing, and in order to save some space, i want to serialize the decimals as int, if possible value wise. Performance is a concern, since i am dealing with a high volume of data. The current method i use is: if ((value >…
anchandra
  • 1,089
  • 12
  • 23
4
votes
1 answer

Type 'Int32' does not conform to protocol 'AnyObject' Swift?

I have a Model, subclass of NSObject, looks like as below. class ConfigDao: NSObject { var categoriesVer : Int32 = Int32() var fireBallIP : String = String () var fireBallPort : Int32 = Int32() var isAppManagerAvailable : Bool =…
Sam Shaikh
  • 1,596
  • 6
  • 29
  • 53
4
votes
3 answers

is NSInteger a 32bit integer

Am I correct in thinking that declaring a NSInteger in an ios environment means it will only ever be a 32bit value? I would like to know as I have been told by another programmer not familiar with objective c to use a int32, the only similar thing I…
HurkNburkS
  • 5,492
  • 19
  • 100
  • 183
3
votes
2 answers

In ASP.Net, what is the best way to store int in system.web.caching?

Currently, I have to convert int to string and store in cache, very complex int test = 123; System.Web.HttpContext.Current.Cache.Insert("key", test.ToString()); // to save the cache test =…
Eric Yin
  • 8,737
  • 19
  • 77
  • 118
3
votes
2 answers

Is it possible to define an int32 value in javascript console?

Do I understand right that it is impossible to define and store an int32 value in the mongodb javascript console? So if I want to do so a have no choice but to write a program in Java or other language with well-typed driver interface? The only more…
CheatEx
  • 2,082
  • 2
  • 19
  • 28
3
votes
2 answers

Objective-C int is bridged as Int32 to Swift

If I'm correct, Objective-C's int type length depends on the platform word length (i.e. it's 64 bit when running in a 64-bit environment and 32-bit when running in a 32-bit environment). However, when bridging an Objective-C interface to Swift, this…
Richard Topchii
  • 7,075
  • 8
  • 48
  • 115
3
votes
5 answers

Return type of numpy.minimum()?

When I use the numpy functions minimum() and maximum() on boolean arrays, the type of the result prints as numpy.int32. However, a comparison with the numpy.int32 type fails (even after a cast). Is this a bug? g = np.ones((5, 5), dtype = np.bool) h…
jehuelsm
  • 103
  • 7
3
votes
3 answers

How does uint32_t guarantee 32 bits?

In most implementations, I've seen uint32_t defined as typedef unsigned int uint32_t; But as I understand it ints are not always guaranteed to be 4 bytes across all systems. So if the system has non 4-byte integers, how does uint32_t guarantee 4?
David says Reinstate Monica
  • 19,209
  • 22
  • 79
  • 122
3
votes
3 answers

Swift 3 - How to convert memory of Int32 as four characters

I want to convert an Int32 to a string consisting of four C-style, 1-byte wide characters (probably closely related to this but in Swift 3). The use for this is that many API functions of Core Audio return an OSStatus (really an Int32), which can…
user6105890
3
votes
1 answer

Hex to int32-Value

I'm currently trying to convert a hex string into its value as a signed int. Example: 0000000E - 14 FFFFFFF2 - -14 So: converting the value for unsigned values is easy: print(tonumber("0000000E", 16)) // outputs 14 negative values can be parsed…
Manawyrm
  • 241
  • 1
  • 13
1 2
3
12 13