GPC module restrictions etc
Jakob.Heinemann at lmemw.ericsson.se
Thu Feb 6 13:34:47 CET 1997
I'm looking at GPC to decide wether or not to use it to port a quit
large application from
VMS to Unix. The original source is written in Vax-pascal, not by me,
some ten years
ago. It consists of lots of compiler dependent features such as
and 'inherit'-statemets that should relatively easy translate to module
exports and imports
of GPC, but also of. constructs that are, perhaps not that easy to
Currently wehave installed the 2.0 version of GPC on our Sun Solaris 5.5
The size of the system, about 175 modules, som 70 klines of code,
the translation have to rely on safe module-import/export functionality.
According to the
documentation the GPI-mechanism is not as stable as it should be.
but what is the actual problem?
what are the limitations?
the problem of unsized strings and GPI import? (I get a warning that
there are incompatible pointers
when calling an imported function with a varying string.)
is there som work beeing done to fix it?
Other questions that I also came up with are:
Calling functions in C, is easy, just put a C; as a declaration af the
body. How about
calling functions in ADA (i.e. Gnat)? The other way around, other
functions written in Pascal?
The code uses lots of varying length strings written partly as schemas,
and partly as some
sort of conformant arrays in parameter lists. A piece fo code may look
Var text_str : varying (. len .) of char ;
procedure testproc ( str : varying (.len .) of char );
var i : integer ;
for i := 1 to len do
This should translate to
Var text_str : string;
procedure testproc ( str : string );
var i : integer ;
for i := 1 to length(str) do
But how about the vax statement for issuing variable amount of
procedure test_pro ( var arg1 : integer; [list] therest : integer) ;
var cnt : integer ;
arg1:= 0 ;
for cnt := 1 to argument_list_length (therest) do
arg1 := arg1 + argument(therest, cnt):
Is there a construct for this in GPC? (in that case I´m sorry but I
haven´t found it in the manual)
I don´t think I'm on the subscriberlist so please post your reply
directly to me aswell.
(I've tried to subscribe , but I'havent hear anything...)
Thank you guys, Gnu Pascal's great, but I still miss some important
consepts from the
extended pascal definition. (Schemas and module integrity...)
Hope that all the stuff will be there some day, right now I feel it is
not so safe
that it will suit our need for this project, but perhaps in the future..
mailto:Jakob.Heinemann at lmemw.ericsson.se
Ericsson Saab Avionics
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Gpc