Talk:Long integer

message: Does this page merit a computing-related stub notice?  To me, computer science is related to computers, but I'm not a programmer or anyone else who deals with the subject.  However, the main article quotes Edsger Dijkstra that it's "no more about computers than astronomy is about telescopes." --Theaterfreak64 23:57, Feb 7, 2005 (UTC)
: The purpose of using a specific stub notice is to help people knowledgeable in a field find stubs that they may be able to work on, so yes I think it would be very appropriate here.  If there were separate stub notices about 'computer science' and 'computers' then I think dijkstra's famous quote would apply, but in this context the distinction is not relevant. --HappyDog 00:36, 8 Feb 2005 (UTC)
thread_title:  stub? 

message: Is a long not 8 bytes? This page gives the impression that it's 4, but a standard integer is 4 bytes. - Ferret 21:47, 29 June 2006 (UTC)
replies: text: Indeed.  Please read the first sentence: "In computer science, a long integer is a variable that can hold a positive or negative whole number whose range is greater or equal to that of a standard integer on the same machine." --HappyDog 17:48, 2 December 2006 (UTC)

text: Reality said so.  Long integer is a starndard, and standards are what allow computers and the internet as we know them to function.  Furthermore, in the .NET Framework, COM/COM+, SQL Server, Oracle, MySql, MS Access, and indeed the Windows Kernal itself, a long integer is eight bytes, while a standard integer is four.  DigitalEnthusiast 21:02, 18 December 2006 (UTC)

text: The short answer to Sean Gray's question is that, yes, in C and C++ at least, the standard definition of long is different from Java's.  —Steve Summit (talk) 13:46, 21 April 2010 (UTC)
thread_title: What

message: If a source becomes required for the issue of "long long" not existing in ISO C++ this proposal to add it could be used: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1811.pdf . It discusses the history in the introduction. Nitwit005 (talk) 08:09, 12 November 2008 (UTC)
thread_title:  "long long" existence 

message: I just slapped a "citation needed" tag on the first row of the table, for the alleged 16 bit version of Visual C++.  Microsoft has done some strange things in the past; but I can't believe anyone would ever define long to be 16 bits in any C-like language. —Steve Summit (talk) 22:25, 20 April 2010 (UTC)
replies: text: The C/C++ standards don't mandate that integers be of any minimum size, only that progressively larger types are greater than or *equal* in size to their predecessors (eg: sizeof(long) >= sizeof(int) >= sizeof(short) >= sizeof(char)); An 8-bit architectures may have an 8-bit long, in other words. Furthermore, the 'long' data type does not even warrant a full page on Wikipedia - sorry! I think we should merge the relevant stuff here into their respective programming language articles and then request that this one be deleted. Sebastian Garth (talk) 15:35, 21 April 2010 (UTC)
replies: text:  I don't have a strong opinion on whether this article should or shouldn't exist, but to your first point, you're quite mistaken.  C and C++ have always specified minimum ranges for the integral types, which imply that char is at least 8 bits, short and int are at least 16, long is at least 32, and (for newer revisions of the standards) long long is at least 64.  (See any good reference on C.)  —Steve Summit (talk) 16:20, 21 April 2010 (UTC)

text: Don't know about the ancient versions of VC++, but the minimum size of long is 32 bits, as can be inferred from limits.h. The expression char buf[sizeof(long) == 1]; is well-formed if and only if char is at least 32 bits. decltype (talk) 17:23, 21 April 2010 (UTC)
replies: text: The most recent 16-bit version of VC++ (1.52) had 32-bit longs, I have removed the entry. decltype (talk) 18:23, 21 April 2010 (UTC)

text: Even the pre-C++ versions of Microsoft C for the PC had 32 bit longs.  However, I wouldn't be at all surprised if some of the really antediluvian versions of C (for the Apple 2 for instance) had 16 bit longs.  But they may not have supported long types at all.  Is it legal to say  on a talk page? - Richfife (talk) 20:47, 21 April 2010 (UTC)

text: no one has popped up with references that far i can see. the best guess ive found myself that far is this one  - no idea how trustworthy that is but it declares "long int" as beeing a 32 bit signed value. less relevant but probably nice to know is the opinion that some embedded c compilers might not care for the standard and use lesser bits even for "long", e.g. 16 bit only (). some language overview can be found here:  - it puts the C++ long into the 4 byte line. Some bits on compiler compatiblity history and other not-that-true assumptions can be found here:  - but could not locate hints on 2 byte long there. the only google hit for "sizeof(long int) == 2" is a single piece of code written for a systematic search on an unknown platform style. a nice image on the topic of the type portability mess is there:  Even a short history on MS C compilers did not provide too much of a hint . - PERIOD - no real hint on any sort of selected size in early microsoft compilers - but if size were different then it would be more likely that people had talked about that. if that type was not present then less fuzz, but even for that there is no indication. present conclusion: no citation available that proves either the 16 or the 32 bit case. no citation available that proves the pure existence of that type. no citation available that provides the tech specs on the compiler version in question or any similar compiler version. -> that former statement without sufficient citation and thus dropped for good reasons at present. there is no source thus its "open" to any good future findings a computer historian might ever bring to light.  (other sources just show how difficult it is to only get the right lines from the "C" standard, and how easy people will get tricked by thinking its only about "int" and drop the "long" in front of it.) --Alexander.stohr (talk) 19:41, 4 May 2010 (UTC)
replies: text: I do have a reference, namely the documentation for VC++ 1.52. Since the reference disproved the claim, I removed it from the article. decltype (talk) 05:56, 6 May 2010 (UTC)
replies: text: You have inspired me, and I have found my Microsoft C/C++ 7.00 for MS-DOS docs which also say that 'long' is 32 bits (that is before Visual C++). That's pretty obvious really. I'm sure there are embedded systems for which 'long' is 16 bits, but the claim about Visual C++ was incorrect because even the earliest Microsoft C compiler (from Lattice C I believe) had 32-bit longs (a trivial thing to achieve on x86). Johnuniq (talk) 07:25, 6 May 2010 (UTC)

text:  I was able to establish that Aztec C for the 6502 used 32 bit longs.  In general, though, I'm kind of allergic to using specific bit counts in text that is not specific to a particular compiler.  For instance, the "long long" sentence that mentions that they're usually 64 bits.  This is one of those red pill / blue pill perfect correctness vs. likelihood to be useful questions, though. - Richfife (talk) 16:42, 10 May 2010 (UTC)
thread_title:  16 bits??? 

message: The C standard does not mandate a minimum byte count of long nor long long, only that sizeof(long long)≥sizeof(long)≥sizeof(int) and that the magnitude of the maximum/minimum values are possible to be represented. 22:27, 3 September 2010 (UTC)
thread_title: Byte count of long long in C