GNU Pascal_(re)

Sun, 29 Jun 1997 12:00:14 +0200 (MET DST)


According to mtdew:
> 
> 	Hi, Im very excited about using your GPC for programming some IRC
> interfaceses (server and client) However, Im new to using GPC (not new to
> borland pascal) and have been finding it difficult to find information on
> commands/functions/procs that are specific to GPC. 

Indeed, our documentation is somehow outdated and incomplete. A lot of
requests for extensions of GPC arise from the fact that nobody knows how
to use the existing features.  Sorry for that.

If you want to help us to improve the GPC documentation, be welcome!  (-:

> 	I'm very interested in any information about opening sockets, so
> that I can use them to connect with other irc servers.. (Or maybe even
> just other servers of any sort of port) Is there support for this?
> (Something similar to C's, 'socket'?)

I don't know much about sockets (would like to know, however), but the
GPC FAQ describes how to use arbitrary C libraries from GNU Pascal:

8< ---- begin (* FAQ extract *) ------------------------------------------

How do I use  from the C library?
============================================================

   GNU Pascal can use every function of your C library, but it may be
up to you to write declaration of an external function, before you can
use it.  Consider the function `sleep'. `man(3) sleep' reveals:

     ---------------------------------------------------------
     NAME
        sleep - Sleep for the specified number of seconds

     SYNOPSIS
        #include 

        unsigned int sleep(unsigned int seconds);
     ---------------------------------------------------------

   This small demo program shows how to use `sleep' in a Pascal program:

     ---------------------------------------------------------
     program SleepDemo;


     type
       word = __unsigned__ integer;

     function sleep(seconds: word): word; C;

     var
       result : word;

     begin
       result := sleep(10);
     end.
     ----------------------------------------------------------

8< ---- end (* FAQ extract *) --------------------------------------------

If you write a GPC Unit (or Module) to access sockets and such, be welcome
to give us a copy we can publish with GPC.

Hope this helps,

    Peter

 Dipl.-Phys. Peter Gerwinski, Essen, Germany, free physicist and programmer
peter.gerwinski@uni-essen.de - http://home.pages.de/~peter.gerwinski/ [970201]
 maintainer GNU Pascal [970624] - http://home.pages.de/~gnu-pascal/ [970125]


Peter Gerwinski (peter@agnes.dida.physik.uni-essen.de)

HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada - Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es