<?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 error while running a code in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/error-while-running-a-code/m-p/3517103#M701170</link>
    <description>i am very new to hp-ux development.&lt;BR /&gt;i wrote the below code. it compiled fine, when i ran it exited eith the message&lt;BR /&gt;&lt;BR /&gt;"Memory fault(coredump)"&lt;BR /&gt;&lt;BR /&gt;#include &lt;STDLIB.H&gt;&lt;BR /&gt;int main()&lt;BR /&gt;{&lt;BR /&gt;char *str;&lt;BR /&gt;int dec=0,sign=0;&lt;BR /&gt;int ndig=0;&lt;BR /&gt;ndig=8;&lt;BR /&gt;printf("before");&lt;BR /&gt;str=_ldecvt(234.9,ndig,&amp;amp;dec,&amp;amp;sign);&lt;BR /&gt;printf("%d %d",dec,sign);&lt;BR /&gt;return 0;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;what could be the problem.&lt;BR /&gt;please help me.&lt;BR /&gt;&lt;/STDLIB.H&gt;</description>
    <pubDate>Mon, 04 Apr 2005 07:17:13 GMT</pubDate>
    <dc:creator>Arun_41</dc:creator>
    <dc:date>2005-04-04T07:17:13Z</dc:date>
    <item>
      <title>error while running a code</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-while-running-a-code/m-p/3517103#M701170</link>
      <description>i am very new to hp-ux development.&lt;BR /&gt;i wrote the below code. it compiled fine, when i ran it exited eith the message&lt;BR /&gt;&lt;BR /&gt;"Memory fault(coredump)"&lt;BR /&gt;&lt;BR /&gt;#include &lt;STDLIB.H&gt;&lt;BR /&gt;int main()&lt;BR /&gt;{&lt;BR /&gt;char *str;&lt;BR /&gt;int dec=0,sign=0;&lt;BR /&gt;int ndig=0;&lt;BR /&gt;ndig=8;&lt;BR /&gt;printf("before");&lt;BR /&gt;str=_ldecvt(234.9,ndig,&amp;amp;dec,&amp;amp;sign);&lt;BR /&gt;printf("%d %d",dec,sign);&lt;BR /&gt;return 0;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;what could be the problem.&lt;BR /&gt;please help me.&lt;BR /&gt;&lt;/STDLIB.H&gt;</description>
      <pubDate>Mon, 04 Apr 2005 07:17:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-while-running-a-code/m-p/3517103#M701170</guid>
      <dc:creator>Arun_41</dc:creator>
      <dc:date>2005-04-04T07:17:13Z</dc:date>
    </item>
    <item>
      <title>Re: error while running a code</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-while-running-a-code/m-p/3517104#M701171</link>
      <description>&lt;BR /&gt;You are compiling with what?&lt;BR /&gt;&lt;BR /&gt;What compile and possible load options did you use?&lt;BR /&gt;&lt;BR /&gt;With gcc I got it to compile and run (executed a.out) with these results:&lt;BR /&gt;before3 0&lt;BR /&gt;&lt;BR /&gt;with just a plain cc I got errors:&lt;BR /&gt;cc: "txt.c", line 9: error 1718: Types are not assignment-compatible.&lt;BR /&gt;cc: "txt.c", line 9: warning 563: Argument #1 is not the correct type.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry d brown jr</description>
      <pubDate>Mon, 04 Apr 2005 07:23:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-while-running-a-code/m-p/3517104#M701171</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2005-04-04T07:23:50Z</dc:date>
    </item>
    <item>
      <title>Re: error while running a code</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-while-running-a-code/m-p/3517105#M701172</link>
      <description>Assuming you are using the cc compiler w/out ansi support, try the following ...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#include &lt;STDLIB.H&gt;&lt;BR /&gt;int main()&lt;BR /&gt;{&lt;BR /&gt;    char *str;&lt;BR /&gt;    int dec=0,sign=0;&lt;BR /&gt;    int ndig=0;&lt;BR /&gt;    long_double value;&lt;BR /&gt;&lt;BR /&gt;    ndig=8;&lt;BR /&gt;    value=strtold("234.9", NULL);&lt;BR /&gt;&lt;BR /&gt;    printf("before");&lt;BR /&gt;    str=_ldfcvt(value, ndig, &amp;amp;dec, &amp;amp;sign);&lt;BR /&gt;    printf("%d %d",dec,sign);&lt;BR /&gt;    return 0;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;But you really ought to get a proper compiler!&lt;/STDLIB.H&gt;</description>
      <pubDate>Mon, 04 Apr 2005 08:47:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-while-running-a-code/m-p/3517105#M701172</guid>
      <dc:creator>Stephen Keane</dc:creator>
      <dc:date>2005-04-04T08:47:35Z</dc:date>
    </item>
    <item>
      <title>Re: error while running a code</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-while-running-a-code/m-p/3517106#M701173</link>
      <description>_ldecvt(); evct();&lt;BR /&gt;I could not get the _ldecvt() library functions to work either. In the HP C/HP-UX reference manual Version A.06.00/A.05.60 page 205 it states that Functons names beginning with a underscore (_) are reserved for library use; you should not speify identifiers that begin with an underscore.&lt;BR /&gt;&lt;BR /&gt;I was able to make your code work using "evct()" which appears to be an equilvant function.&lt;BR /&gt;&lt;BR /&gt;#include &lt;STDLIB.H&gt;&lt;BR /&gt;int main()&lt;BR /&gt;{&lt;BR /&gt;char *str;&lt;BR /&gt;int dec=0,sign=0;&lt;BR /&gt;int ndig=0;&lt;BR /&gt;ndig=8;&lt;BR /&gt;long double value=234.9;&lt;BR /&gt;(void) printf("before\n");&lt;BR /&gt;str=ecvt(value,ndig,&amp;amp;dec,&amp;amp;sign);&lt;BR /&gt;(void) printf("%s\n",str);&lt;BR /&gt;(void) printf("%d %d\n",dec,sign);&lt;BR /&gt;return 0;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;Rory&lt;/STDLIB.H&gt;</description>
      <pubDate>Tue, 05 Apr 2005 11:41:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-while-running-a-code/m-p/3517106#M701173</guid>
      <dc:creator>Rory R Hammond</dc:creator>
      <dc:date>2005-04-05T11:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: error while running a code</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/error-while-running-a-code/m-p/3517107#M701174</link>
      <description>HI all,&lt;BR /&gt;     Thanks for your reply. &lt;BR /&gt;     The program is running fine.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Arun</description>
      <pubDate>Wed, 06 Apr 2005 00:08:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/error-while-running-a-code/m-p/3517107#M701174</guid>
      <dc:creator>Arun_41</dc:creator>
      <dc:date>2005-04-06T00:08:53Z</dc:date>
    </item>
  </channel>
</rss>

