GPC and UNIX Curses
Tue, 25 Mar 1997 21:41:57 +0100 (MET)
According to Ronald Perrella:
> There are two name in Curses that are different only
> by their capitalization. One is a variable declared as extern.
> The other is a function.
Use the `asmname' directive to access them. Their *Pascal* names
must of course differ.
> example:
>
> /* in C */
> extern int COLORS;
>
> extern int colors();
>
> (* in Pascal *)
Var
ColorVar: __asmname__ 'COLORS' Integer;
Function ColorFunc: Integer; asmname 'colors';
Sorry for the underscores and the different syntax for variables and
functions. I already suggested to replace `asmname' with something like
`external name',
Var
ColorVar: Integer; external name 'COLORS';
Function ColorFunc: Integer; external name 'colors';
but I did not yet work on this. (See the GPC list archives, starting with
7 Sep 1996, for a discussion about pros and contras for different ideas for
the syntax for external name specification.)
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 - 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