<?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: Help - cant compile c program with function in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/help-cant-compile-c-program-with-function/m-p/4710664#M659864</link>
    <description>&amp;gt;Steven: This is (well-designed) C,&lt;BR /&gt;&lt;BR /&gt;But it is obsolescent in C99, so you shouldn't code that way.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Does the message actually have "inconsistent"&lt;BR /&gt;spelled wrong?&lt;BR /&gt;&lt;BR /&gt;No, the PA compiler gets that right:  :-)&lt;BR /&gt;cc: error 1584: Inconsistent type declaration: "dc".&lt;BR /&gt;cc: error 1711: Inconsistent parameter list declaration for "dc".</description>
    <pubDate>Tue, 09 Nov 2010 06:50:05 GMT</pubDate>
    <dc:creator>Dennis Handly</dc:creator>
    <dc:date>2010-11-09T06:50:05Z</dc:date>
    <item>
      <title>Help - cant compile c program with function</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-cant-compile-c-program-with-function/m-p/4710655#M659855</link>
      <description>Been awhile since I did any c programs with function declarations. This gives error 1584 (inconsistant type declaration).</description>
      <pubDate>Mon, 08 Nov 2010 18:50:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-cant-compile-c-program-with-function/m-p/4710655#M659855</guid>
      <dc:creator>Dave Chamberlin</dc:creator>
      <dc:date>2010-11-08T18:50:18Z</dc:date>
    </item>
    <item>
      <title>Re: Help - cant compile c program with function</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-cant-compile-c-program-with-function/m-p/4710656#M659856</link>
      <description>You need to list the types in your function declaration too. Listing them in the function prototype only is not enough.&lt;BR /&gt;&lt;BR /&gt;Change:&lt;BR /&gt;----&lt;BR /&gt;dc(a,b)&lt;BR /&gt;{&lt;BR /&gt;----&lt;BR /&gt;to:&lt;BR /&gt;----&lt;BR /&gt;double dc(double a, double b)&lt;BR /&gt;{&lt;BR /&gt;----&lt;BR /&gt;&lt;BR /&gt;MK</description>
      <pubDate>Mon, 08 Nov 2010 19:56:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-cant-compile-c-program-with-function/m-p/4710656#M659856</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2010-11-08T19:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: Help - cant compile c program with function</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-cant-compile-c-program-with-function/m-p/4710657#M659857</link>
      <description>The 1584 error is still there after changing the function to dc(double a, double b). Also tried chaning the declaration to double dc(double a, double b)</description>
      <pubDate>Mon, 08 Nov 2010 20:03:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-cant-compile-c-program-with-function/m-p/4710657#M659857</guid>
      <dc:creator>Dave Chamberlin</dc:creator>
      <dc:date>2010-11-08T20:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: Help - cant compile c program with function</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-cant-compile-c-program-with-function/m-p/4710658#M659858</link>
      <description>&amp;gt;MK: Listing them in the function prototype only is not enough.&lt;BR /&gt;&lt;BR /&gt;It would also help if the prototype was at file scope.</description>
      <pubDate>Mon, 08 Nov 2010 20:26:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-cant-compile-c-program-with-function/m-p/4710658#M659858</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2010-11-08T20:26:51Z</dc:date>
    </item>
    <item>
      <title>Re: Help - cant compile c program with function</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-cant-compile-c-program-with-function/m-p/4710659#M659859</link>
      <description>&amp;gt;Also tried changing the declaration to: double dc(double a, double b)&lt;BR /&gt;&lt;BR /&gt;What's the current source look like?</description>
      <pubDate>Mon, 08 Nov 2010 20:45:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-cant-compile-c-program-with-function/m-p/4710659#M659859</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2010-11-08T20:45:37Z</dc:date>
    </item>
    <item>
      <title>Re: Help - cant compile c program with function</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-cant-compile-c-program-with-function/m-p/4710660#M659860</link>
      <description>#include &lt;STDIO.H&gt;&lt;BR /&gt;#include &lt;MATH.H&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;int main(void)&lt;BR /&gt;{&lt;BR /&gt;double a,b,intg;&lt;BR /&gt;double dc(double a,double b);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;  a=1.0;&lt;BR /&gt;  b=2.0;&lt;BR /&gt;&lt;BR /&gt;  intg=dc(a,b);&lt;BR /&gt;  printf("sum is %g\n",intg);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;dc(double a,double b)&lt;BR /&gt;{&lt;BR /&gt; double q; &lt;BR /&gt; q=a+b;&lt;BR /&gt;  return q;&lt;BR /&gt;}&lt;BR /&gt;&lt;/MATH.H&gt;&lt;/STDIO.H&gt;</description>
      <pubDate>Mon, 08 Nov 2010 20:57:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-cant-compile-c-program-with-function/m-p/4710660#M659860</guid>
      <dc:creator>Dave Chamberlin</dc:creator>
      <dc:date>2010-11-08T20:57:22Z</dc:date>
    </item>
    <item>
      <title>Re: Help - cant compile c program with function</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-cant-compile-c-program-with-function/m-p/4710661#M659861</link>
      <description>Hi Dave:&lt;BR /&gt;&lt;BR /&gt;You didn't follow what Matti wrote:&lt;BR /&gt;&lt;BR /&gt;...&lt;BR /&gt;double dc(double a, double b)&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 08 Nov 2010 20:58:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-cant-compile-c-program-with-function/m-p/4710661#M659861</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-11-08T20:58:57Z</dc:date>
    </item>
    <item>
      <title>Re: Help - cant compile c program with function</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-cant-compile-c-program-with-function/m-p/4710662#M659862</link>
      <description>That did it - thanks!</description>
      <pubDate>Mon, 08 Nov 2010 21:55:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-cant-compile-c-program-with-function/m-p/4710662#M659862</guid>
      <dc:creator>Dave Chamberlin</dc:creator>
      <dc:date>2010-11-08T21:55:05Z</dc:date>
    </item>
    <item>
      <title>Re: Help - cant compile c program with function</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-cant-compile-c-program-with-function/m-p/4710663#M659863</link>
      <description>&lt;!--!*#--&gt;This is (well-designed) C, so no type in a&lt;BR /&gt;declaration is equivalent to "int", so:&lt;BR /&gt;      dc( [...]&lt;BR /&gt;is equivalent to:&lt;BR /&gt;      int dc( [...]&lt;BR /&gt;which is "inconsistant" with:&lt;BR /&gt;      double dc( [...]&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Does the message actually have "inconsistent"&lt;BR /&gt;spelled wrong, or was that your contribution?</description>
      <pubDate>Mon, 08 Nov 2010 21:56:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-cant-compile-c-program-with-function/m-p/4710663#M659863</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2010-11-08T21:56:29Z</dc:date>
    </item>
    <item>
      <title>Re: Help - cant compile c program with function</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-cant-compile-c-program-with-function/m-p/4710664#M659864</link>
      <description>&amp;gt;Steven: This is (well-designed) C,&lt;BR /&gt;&lt;BR /&gt;But it is obsolescent in C99, so you shouldn't code that way.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Does the message actually have "inconsistent"&lt;BR /&gt;spelled wrong?&lt;BR /&gt;&lt;BR /&gt;No, the PA compiler gets that right:  :-)&lt;BR /&gt;cc: error 1584: Inconsistent type declaration: "dc".&lt;BR /&gt;cc: error 1711: Inconsistent parameter list declaration for "dc".</description>
      <pubDate>Tue, 09 Nov 2010 06:50:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-cant-compile-c-program-with-function/m-p/4710664#M659864</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2010-11-09T06:50:05Z</dc:date>
    </item>
    <item>
      <title>Re: Help - cant compile c program with function</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-cant-compile-c-program-with-function/m-p/4710665#M659865</link>
      <description>&lt;!--!*#--&gt;&amp;gt; [...] you shouldn't code that way.&lt;BR /&gt;&lt;BR /&gt;No argument here.  I claim that&lt;BR /&gt;      IMPLICIT NONE&lt;BR /&gt;was the best thing that ever happened to&lt;BR /&gt;FORTRAN.  The amazing thing is that someone&lt;BR /&gt;thought that "implicit int" was a good idea&lt;BR /&gt;for C.</description>
      <pubDate>Tue, 09 Nov 2010 14:34:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-cant-compile-c-program-with-function/m-p/4710665#M659865</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2010-11-09T14:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: Help - cant compile c program with function</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-cant-compile-c-program-with-function/m-p/4710666#M659866</link>
      <description>You're right Steve.&lt;BR /&gt;&lt;BR /&gt;I can remember wading through fortran just absolutely loaded with implicits from all over the place. Nasty.  Really nasty when the code wasn't yours, and was written over 25 years ago, and no-one was familiar with it.  All I could do was make subroutines &lt;BR /&gt;&lt;BR /&gt;The worst I ever saw was in a C program that I became the chief owner of, it was a total of 250K lines of code, and in the middle of one of the longest pieces, I found the following indented over about 200 spaces to the right.&lt;BR /&gt;&lt;BR /&gt;m++;&lt;BR /&gt;&lt;BR /&gt;I wrote an awk script to give me a look at program flow and variable declarations.  I never found it where "m" was declared, and I never found it became instantiated.  The debugger was crud (it was an off brand C compiler, I forget the name) so putting a "watch" on m was impossible to see if I could watch it come to life.  Ugh.&lt;BR /&gt;&lt;BR /&gt;So, I commented the line out and recompiled.  And nothing worked.  &lt;BR /&gt;&lt;BR /&gt;:-)&lt;BR /&gt;&lt;BR /&gt;Dave, no points for this please, it was just an old bad memory I wanted to share for some reason.</description>
      <pubDate>Tue, 09 Nov 2010 15:17:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-cant-compile-c-program-with-function/m-p/4710666#M659866</guid>
      <dc:creator>TwoProc</dc:creator>
      <dc:date>2010-11-09T15:17:21Z</dc:date>
    </item>
  </channel>
</rss>

