Hi,
I am porting SUN Pascal code to GNU Pascal. When I first read the GNU Pascal documentation (the pdf manual), I was pleased to see that GNU Pascal strings were in fact records with the length and the string text: this map perfectly with SUN Pascal VARYING[..] OF CHAR we use, since it is a record with 4 bytes for the length and an array of char. So, no porting problem...
But now, I see in gdb that a GNU Pascal variable of type STRING(20) is not anymore as in the documentation: There are two fields of type Cardinal holding the capacity and the actual length of the string, plus the array of char. Since the low-level part of our applications are written in C, many of them get Pascal strings as parameters and map them on C struct's. They rely on the SUN Pascal type to find the length and the text. Is there a way (a compiler option?) to have the STRING type map as explained in the documentation, or will have I to modify all the C routines (a big task)?
Pascal