473,395 Members | 1,581 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

increase integer limit?

u have said that integer length depends upon machine-to-machine. can i increase the integer limit on my own?
does a 32-bit system has different limit than 64-bit system?
Apr 13 '10 #1
4 6018
RedSon
5,000 Expert 4TB
Usually integer is understood to be a 32bit value. Using "int" I believe this is pretty standard. However the internal representation of an int can be independent of the machine. You will have to check the documentation of your compiler and platform. If you want to use a larger value you can look for datatypes like _int64 or double long or something like that.

Provide more information about your compiler and platform and then we can provide more specific information.
Apr 13 '10 #2
Banfa
9,065 Expert Mod 8TB
On a 64 bit Linux machine the long data type is 64 bits.

Unfortunately this is not true on Windows long is still 32 bits which means that even on a 64 bit Windows machine there is no standard 64 bit type that you can use. There are often platform specific types, like __int64 butthese are strictly non-portable.
Apr 13 '10 #3
RedSon
5,000 Expert 4TB
@Banfa
Ninja ' d
Apr 13 '10 #4
donbock
2,426 Expert 2GB
Standard C syntax does not provide any way to alter the size of the int type. It is what it is; and what it is can vary from one compiler to another.

As I recall, the Standard requires int to be no smaller than short and no bigger than long. It also mandates that short be at least 16 bits and long be at least 32 bits; but either is allowed to be larger than that as long as short is less than or equal to long.

C99 introduced the long long type, which is required to be at least 64 bits; and which must be greater than or equal to long. The C++ Standard does not mention long long, but it might be available in your compiler as a nonportable extension.

It is not inconceivable that your particular compiler has command line options that affect the sizes of the integer types. Command line options are outside the scope of the Standard. You will have to check your compiler documentation.
Apr 14 '10 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Dave 2 | last post by:
Yes, another memory limit question. Our PHP application is running with PHP 4.3.9 running in CGI mode under Windows IIS 5. When a user tries to download a file that is 'too large', the...
2
by: SpaceDust | last post by:
I am developing in MSVC++ .Net 2003, using MFC, building a realtime telemetry display. I have reached an object limit of 255, but need to add another 20+ objects. Is there a simple way to increase...
1
by: coosa | last post by:
Hi all, I get this message when trying to update a tabel i have which has nested hierarchies. The current hierarchies beginning from root = 1 are up to the level 5. Before going into details and...
1
by: Michael Yanowitz | last post by:
Hello: It appears that there is a 255 argument limit in Python 2.4.3? 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21...
9
by: eastcoastguyz | last post by:
I wrote a simple program to continue to create a very large file (on purpose), and even though there is plenty of disk space on that device the program aborted with the error message "File Size...
5
by: =?windows-1256?B?5eTPx+bs?= | last post by:
Python allow you to only take care about variable name and ignore it's size because pyhton dynamicly allocate it so what's the limit in the allocated size in the memory
2
by: Ron Hinds | last post by:
I'm getting this in an ASP application on IIS6/W2K3. The page in question is trying to return a XML file approximately 45MB in size. Changing this is not an option. Worked fine on IIS5/W2K. I tried...
8
by: bullfrog83 | last post by:
I've found that a combobox will only display 10,000 records. Is there a way to increase this limit? I want my users to be able to search for people by name and I thought it'd be easiest for them to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.