<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic What is the different between 32bits and 64bits for data types in C? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/what-is-the-different-between-32bits-and-64bits-for-data-types/m-p/4902949#M701920</link>
    <description>How to define the data type of 4 bytes integer with 64bits compiler options? and 1 byte char, 4 bytes float... &lt;BR /&gt;Where can I find some documents about it?&lt;BR /&gt;&lt;BR /&gt;Best Regards.</description>
    <pubDate>Thu, 19 May 2005 12:34:10 GMT</pubDate>
    <dc:creator>MA Qiang</dc:creator>
    <dc:date>2005-05-19T12:34:10Z</dc:date>
    <item>
      <title>What is the different between 32bits and 64bits for data types in C?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/what-is-the-different-between-32bits-and-64bits-for-data-types/m-p/4902949#M701920</link>
      <description>How to define the data type of 4 bytes integer with 64bits compiler options? and 1 byte char, 4 bytes float... &lt;BR /&gt;Where can I find some documents about it?&lt;BR /&gt;&lt;BR /&gt;Best Regards.</description>
      <pubDate>Thu, 19 May 2005 12:34:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/what-is-the-different-between-32bits-and-64bits-for-data-types/m-p/4902949#M701920</guid>
      <dc:creator>MA Qiang</dc:creator>
      <dc:date>2005-05-19T12:34:10Z</dc:date>
    </item>
    <item>
      <title>Re: What is the different between 32bits and 64bits for data types in C?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/what-is-the-different-between-32bits-and-64bits-for-data-types/m-p/4902950#M701921</link>
      <description>The best way to answer your question is to ask the machine itself.&lt;BR /&gt;&lt;BR /&gt;Compiles the attached C program thusly:&lt;BR /&gt;cc +DD64 sizes.c -o sizes64&lt;BR /&gt;cc +DD32 sizes.c -o sizes32&lt;BR /&gt;&lt;BR /&gt;and then execute each program.&lt;BR /&gt;&lt;BR /&gt;The documentation for this is found under /opt/ansic/html&lt;BR /&gt;&lt;BR /&gt;Here is a quote from one of the .html's that illustrates a good technique for portability.&lt;BR /&gt;------------------------------------------&lt;BR /&gt;Improving Portability&lt;BR /&gt;Type definitions can be used to compensate for differences in C compilers. For example: &lt;BR /&gt;#if SMALL_COMPUTER&lt;BR /&gt;    typedef int SHORTINT;&lt;BR /&gt;    typedef long LONGINT;&lt;BR /&gt;&lt;BR /&gt;#elif&lt;BR /&gt;    BIG_COMPUTER&lt;BR /&gt;    typedef short SHORTINT;&lt;BR /&gt;    typedef int LONGINT;&lt;BR /&gt;&lt;BR /&gt;#endif&lt;BR /&gt;This is useful when writing code to run on two computers, a small computer where an int is two bytes, and a large computer where an int is four bytes. Instead of using short, long, and int, you can use SHORTINT and LONGINT and be assured that SHORTINT is two bytes and LONGINT is four bytes regardless of the machine. &lt;BR /&gt;&lt;BR /&gt;-------------------------------------&lt;BR /&gt;&lt;BR /&gt;I have used a similar technique for many years so that I never use the native types but rather use a typedef'ed version.&lt;BR /&gt;</description>
      <pubDate>Thu, 19 May 2005 15:01:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/what-is-the-different-between-32bits-and-64bits-for-data-types/m-p/4902950#M701921</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2005-05-19T15:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: What is the different between 32bits and 64bits for data types in C?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/what-is-the-different-between-32bits-and-64bits-for-data-types/m-p/4902951#M701922</link>
      <description>Ooops, I missed the sizes.c attachment.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 19 May 2005 15:02:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/what-is-the-different-between-32bits-and-64bits-for-data-types/m-p/4902951#M701922</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2005-05-19T15:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: What is the different between 32bits and 64bits for data types in C?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/what-is-the-different-between-32bits-and-64bits-for-data-types/m-p/4902952#M701923</link>
      <description>Thank you!</description>
      <pubDate>Sat, 21 May 2005 08:18:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/what-is-the-different-between-32bits-and-64bits-for-data-types/m-p/4902952#M701923</guid>
      <dc:creator>MA Qiang</dc:creator>
      <dc:date>2005-05-21T08:18:58Z</dc:date>
    </item>
  </channel>
</rss>

