⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 longlong.awjd.html

📁 this is a mirrored site c-faq. thought might need offline
💻 HTML
字号:
<html><!-- Mirrored from c-faq.com/decl/longlong.awjd.html by HTTrack Website Copier/3.x [XR&CO'2008], Sat, 14 Mar 2009 07:59:10 GMT --><head><title></title></head><body>[This was written by Alan Watson and Jutta Degener,and sent to me by Alan.]<!-- Date: Sat, 5 Apr 1997 12:48:17 -0700 --><!-- Message-Id: &lt;9704051948.AA31977@oldp.nmsu.edu&gt; --><p><center>ABSTRACT</center><p><blockquote>This document proposes a new type <TT>long&nbsp;long</TT>,an integral type with a guaranteed precision of at least64 bits.  This follows widespread <i>de facto</i> standardestablished by compiler vendors, who, faced with theircustomers' requests for large integer types, preferredto extend the language rather than change the size ofan existing type.</blockquote><p><h3>I.  Introduction</h3><p>Large data bases, large file systems, and objectrequest broker systems need large integers.  C9X shouldrespond to this need by providing an integer type with aguaranteed precision of at least 64 bits.<p>At first glance,it might seem that this can be easily accomplished byrequiring <TT>long</TT> to have at least 64 bits of precision.However, a C9X Standard that did this would force vendors tobreak their customers' code; not just unportable code thatfollows the widespread assumption of 32-bit long integers,but also any code that uses precompiled libraries and binaryformat data.  Such a standard might well meet resistance froma significant fraction of vendors and users.<p>Vendors have considerable freedom of choice of the sizeof the basic data types when they introduce a completely newsystem (on which all of the software will be new and will sharethe same data sizes), but changing the size or representationof a basic data type on an existing system haswidespread consequences.<p>Consider what happens when a customer modifies andrecompiles an application on an implementation which hasjust changed the size of a <TT>long</TT> from 32 bits to 64 bits.Raw binary data files break.  Perhaps more importantly,calls to libraries compiled with the old implementationbreak (the library source file says that the argument to aparticular function is a <TT>long</TT>, which was 32 bits in the oldimplementation, so the function in the library object fileexpects to be passed a 32 bit type; the library header file,included by the application, also says that the argument tothe same function is a <TT>long</TT>, which is now 64 bits, so theapplication passes a 64 bit type).<p>The consequence is that the customer cannot modify anapplication without recompiling (if they have source) orobtaining recompiled versions of (if they do not) all of thelibraries used by that application.  Everything has tochange at once; there is no gentle transition.  For thisreason, many system vendors chose to avoid changing thesizes of the basic integer types and instead established<TT>long&nbsp;long</TT> as a de facto standard.<p>C9X should follow the vendors' practice and introduce<TT>long&nbsp;long</TT> as a new basic integer type with a guaranteedminimum precision of 64 bits.</body><!-- Mirrored from c-faq.com/decl/longlong.awjd.html by HTTrack Website Copier/3.x [XR&CO'2008], Sat, 14 Mar 2009 07:59:10 GMT --></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -