<?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 Re: Alternative for sizeof operator in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/alternative-for-sizeof-operator/m-p/3063405#M30977</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I am talking about C programming language.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Poornima</description>
    <pubDate>Thu, 04 Sep 2003 04:12:43 GMT</pubDate>
    <dc:creator>WSSPL</dc:creator>
    <dc:date>2003-09-04T04:12:43Z</dc:date>
    <item>
      <title>Alternative for sizeof operator</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/alternative-for-sizeof-operator/m-p/3063403#M30975</link>
      <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;Is there any alternative to find the size of&lt;BR /&gt;data type like int, char apart from sizeof() operator.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Poornima.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 04 Sep 2003 03:36:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/alternative-for-sizeof-operator/m-p/3063403#M30975</guid>
      <dc:creator>WSSPL</dc:creator>
      <dc:date>2003-09-04T03:36:38Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative for sizeof operator</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/alternative-for-sizeof-operator/m-p/3063404#M30976</link>
      <description>How about a little more info here?&lt;BR /&gt;&lt;BR /&gt;What (programing) language are you talking about?</description>
      <pubDate>Thu, 04 Sep 2003 04:04:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/alternative-for-sizeof-operator/m-p/3063404#M30976</guid>
      <dc:creator>Mike Naime</dc:creator>
      <dc:date>2003-09-04T04:04:40Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative for sizeof operator</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/alternative-for-sizeof-operator/m-p/3063405#M30977</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I am talking about C programming language.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Poornima</description>
      <pubDate>Thu, 04 Sep 2003 04:12:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/alternative-for-sizeof-operator/m-p/3063405#M30977</guid>
      <dc:creator>WSSPL</dc:creator>
      <dc:date>2003-09-04T04:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative for sizeof operator</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/alternative-for-sizeof-operator/m-p/3063406#M30978</link>
      <description>Hi Poornima,&lt;BR /&gt;No there is not alternative to sizeof() operator in standard ANSI C.&lt;BR /&gt;Sizeof() is a compiletime operator can be applied to type too ,i.e. sizeof(int); runtime not call any function so sizeof() is very quick.&lt;BR /&gt;Why do you will not use sizeof() operator?&lt;BR /&gt;&lt;BR /&gt;Antoniov&lt;BR /&gt;</description>
      <pubDate>Thu, 04 Sep 2003 06:16:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/alternative-for-sizeof-operator/m-p/3063406#M30978</guid>
      <dc:creator>Antoniov.</dc:creator>
      <dc:date>2003-09-04T06:16:11Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative for sizeof operator</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/alternative-for-sizeof-operator/m-p/3063407#M30979</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Actually, this is a tricky question asked &lt;BR /&gt;by one of my friends who is proficient is C language. &lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Poornima.</description>
      <pubDate>Thu, 04 Sep 2003 08:15:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/alternative-for-sizeof-operator/m-p/3063407#M30979</guid>
      <dc:creator>WSSPL</dc:creator>
      <dc:date>2003-09-04T08:15:52Z</dc:date>
    </item>
    <item>
      <title>Re: Alternative for sizeof operator</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/alternative-for-sizeof-operator/m-p/3063408#M30980</link>
      <description>Hi Poormina,&lt;BR /&gt;if it's only a tricly question, you can use other then sizeof as follow:&lt;BR /&gt;&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;#define mysize  sizeof&lt;BR /&gt;main ()&lt;BR /&gt;{&lt;BR /&gt;     unsigned short size_of;&lt;BR /&gt;     long iMyVar, *piMyVar;&lt;BR /&gt;&lt;BR /&gt;     piMyVar = iMyVar;&lt;BR /&gt;     size_of = ((unsigned long) (piMyVar + 1))&lt;BR /&gt;                 - ((unsigned long) (piMyVar));&lt;BR /&gt;     printf("%d %d %d",mysize(iMyVar), size_of, sizeof(iMyVar));&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Above program run correctly (you can try).&lt;BR /&gt;1.st is a macro that redefines a sizeof operator.&lt;BR /&gt;In second statetemnt (size_of = ...), program evaluate address of a variable and next location; every address is casted into long and different is located in size_of variable.&lt;BR /&gt;Look that without unsigned long casting, different it equal to 1!!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;H.T.H.&lt;BR /&gt;Antoniov&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/STDIO.H&gt;</description>
      <pubDate>Thu, 04 Sep 2003 11:40:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/alternative-for-sizeof-operator/m-p/3063408#M30980</guid>
      <dc:creator>Antoniov.</dc:creator>
      <dc:date>2003-09-04T11:40:19Z</dc:date>
    </item>
  </channel>
</rss>

