<?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: Pascal code to use a C function in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/pascal-code-to-use-a-c-function/m-p/4850769#M701764</link>
    <description>forget it! - I have found my own solution</description>
    <pubDate>Thu, 12 May 2005 10:24:53 GMT</pubDate>
    <dc:creator>Stephen Badgett</dc:creator>
    <dc:date>2005-05-12T10:24:53Z</dc:date>
    <item>
      <title>Pascal code to use a C function</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pascal-code-to-use-a-c-function/m-p/4850762#M701751</link>
      <description>I am writting a pascal program that I would like to use use some of the "C" functions like "open(),read(),write() and close()" instead of the pascal "open,read,write ..."  &lt;BR /&gt;I know that I can write a "C" stub and call it as a function but what I would like to do is make the call to the "C" "open()" directly from the pascal program instead of writting a stub like "openit.c" &lt;BR /&gt;&lt;BR /&gt;Is there a way to do this?</description>
      <pubDate>Fri, 31 Oct 2003 13:58:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pascal-code-to-use-a-c-function/m-p/4850762#M701751</guid>
      <dc:creator>Stephen Badgett</dc:creator>
      <dc:date>2003-10-31T13:58:49Z</dc:date>
    </item>
    <item>
      <title>Re: Pascal code to use a C function</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pascal-code-to-use-a-c-function/m-p/4850763#M701752</link>
      <description>If you think about this for a moment you will realize that this is pretty much Looney Tunes. Let's take for example the 'read' function or more properly in Pascal, the read procedure. To Pascal this is a hi-level operation with a great deal of abstraction. You simply say "read x, y;" and voila x and y are read -- regardless of whether x and y are real, integer, boolean, ... because the compiler actually translates the high level "read x, y" into lower-level i/o operations appropriate to the data type. In C, open is a low-level system call and it is the sole responsibility of the programmer to format the data, pass a pointer to the data, number of bytes to read, and the file descriptor --- itself a much lower-level construct than Pascal's FILE.&lt;BR /&gt; &lt;BR /&gt;</description>
      <pubDate>Fri, 31 Oct 2003 14:18:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pascal-code-to-use-a-c-function/m-p/4850763#M701752</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2003-10-31T14:18:14Z</dc:date>
    </item>
    <item>
      <title>Re: Pascal code to use a C function</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pascal-code-to-use-a-c-function/m-p/4850764#M701753</link>
      <description>There are HP-specific mechanisms for making calls from pascal to code written in other languages.  You will probably need to use an alias from a different name to avoid conflicts&lt;BR /&gt;with pascal keywords.  See&lt;BR /&gt;"HP Pascal/HP-UX Programmer's Guide" and&lt;BR /&gt;"HP Pascal/HP-UX Reference Manual" at&lt;BR /&gt;&lt;A href="http://www.docs.hp.com./hpux/dev/index.html#Pascal" target="_blank"&gt;http://www.docs.hp.com./hpux/dev/index.html#Pascal&lt;/A&gt;</description>
      <pubDate>Mon, 03 Nov 2003 11:50:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pascal-code-to-use-a-c-function/m-p/4850764#M701753</guid>
      <dc:creator>Mike Stroyan</dc:creator>
      <dc:date>2003-11-03T11:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: Pascal code to use a C function</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pascal-code-to-use-a-c-function/m-p/4850765#M701756</link>
      <description>Thank you A. Clay and Mike,&lt;BR /&gt;&lt;BR /&gt;Look like I will have to write "c" wrappers for these calls. &lt;BR /&gt;&lt;BR /&gt;I have attached the pascal file if you would like to look at what I am doing.&lt;BR /&gt;&lt;BR /&gt;Steve</description>
      <pubDate>Mon, 03 Nov 2003 12:28:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pascal-code-to-use-a-c-function/m-p/4850765#M701756</guid>
      <dc:creator>Stephen Badgett</dc:creator>
      <dc:date>2003-11-03T12:28:03Z</dc:date>
    </item>
    <item>
      <title>Re: Pascal code to use a C function</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pascal-code-to-use-a-c-function/m-p/4850766#M701758</link>
      <description>Well, you obviously didn't like my first responce when I basically told you that you were asking the Pascal compiler to distinguish between 'read' and 'read' so you probably won't like this answer either. Why not do this in C? You seem to running around the world to do very trivial things. Also, unless you specifically need the low-level i/o that read and write provide, you can use use fopen() (or popen) to create files which are generally easier to use than fdes i/o. &lt;BR /&gt;&lt;BR /&gt;When I first came into the UNIX world I was very proficient in Pascal and found that more and more I was calling external C routines. I finally gave up and did everything in C. If you have a great deal of Pascal code, there is a Gnu utility that will translate your Pascal to reasonably good C.&lt;BR /&gt;</description>
      <pubDate>Mon, 03 Nov 2003 14:44:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pascal-code-to-use-a-c-function/m-p/4850766#M701758</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2003-11-03T14:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: Pascal code to use a C function</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pascal-code-to-use-a-c-function/m-p/4850767#M701760</link>
      <description>It was not that I did not like your response I was asking what my boss was needing for this Pascal issue we confronted.  I also did not have a lot of time to explore if there was a solution for this issue.  I did know that the external c program works fine and this is currently my solution but in short I had to know if there is any way to do this without using c directly (extern).  I like c and use it extensively in our coding requirements but not in our current application code I am fixing.  This current application is quite huge and rewriting it in c will be the future of this application and since c does so well in what it does I know that is the direction we will end up.  What Gnu utility you were talking about?  So I apologize in the points giving, I was looking for a Pascal solution and I know c enough to write most everything in c and have used EXTERNAL enough think the same about rewriting the application in c if I had time but I was looking for something I guess was not there.  So, I guess I have to apologize in all I do since I am taken wrong most of the time.  The little knowledge I know about Pascal I find it quite weak in some areas.  Do have a nice day, I am (:  &lt;BR /&gt;&lt;BR /&gt;Steve&lt;BR /&gt;</description>
      <pubDate>Mon, 03 Nov 2003 15:41:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pascal-code-to-use-a-c-function/m-p/4850767#M701760</guid>
      <dc:creator>Stephen Badgett</dc:creator>
      <dc:date>2003-11-03T15:41:27Z</dc:date>
    </item>
    <item>
      <title>Re: Pascal code to use a C function</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pascal-code-to-use-a-c-function/m-p/4850768#M701762</link>
      <description>Here's the Pascal to C translator.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://hpux.connect.org.uk/hppd/hpux/Languages/p2c-1.20/" target="_blank"&gt;http://hpux.connect.org.uk/hppd/hpux/Languages/p2c-1.20/&lt;/A&gt;</description>
      <pubDate>Mon, 03 Nov 2003 15:58:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pascal-code-to-use-a-c-function/m-p/4850768#M701762</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2003-11-03T15:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: Pascal code to use a C function</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/pascal-code-to-use-a-c-function/m-p/4850769#M701764</link>
      <description>forget it! - I have found my own solution</description>
      <pubDate>Thu, 12 May 2005 10:24:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/pascal-code-to-use-a-c-function/m-p/4850769#M701764</guid>
      <dc:creator>Stephen Badgett</dc:creator>
      <dc:date>2005-05-12T10:24:53Z</dc:date>
    </item>
  </channel>
</rss>

