Hello here!
The code below yields the following error on (e.g.) gpc version 20020910, based on gcc-2.95.4 20011002 (Debian prerelease)
v.p: In procedure `Getfilename': v.p:8: prior parameter's size depends on `Fext' v.p:8: prior parameter's size depends on `Fext'
If the second parameter of the activation of set_suffix is set to the variable "fextt", then it compiles normally.
HOWEVER, if getfilename is removed from the interface, such that getfilename is completely local to IMPLEMENTATION, and apart from the structuring by modules the program is exactly the same, it ALSO compiles normally.
AND, if for instance the TYPE IsoString is changed to a fixed array, no schemata, all is well ALSO.
The question is, is using the second parameter as below ALLOWED according to the Extended Pascal report? 1 If so, this is a gpc bug. 2 If NOT, I can't find it in the Extended Pascal report. (Somehow I can see the need for this restriction, and I can live with it, I just can find it. Actually I started reading the report but stranded in the, for me, too complex formulation :) )
Does anyone on the list know the answer, is it 1 or 2?
Regards, Sietse
{************************************} MODULE msge INTERFACE; EXPORT msge = ( IsoString, getfilename); TYPE IsoString (Capacity : Integer) = array [1 .. Capacity + 1] of Integer; PROCEDURE getfilename (VAR fnm: IsoString; fext: IsoString); END.
MODULE msge IMPLEMENTATION;
VAR fextt : IsoString(30);
PROCEDURE set_suffix (VAR fnm: IsoString; fext: IsoString); BEGIN END;
PROCEDURE getfilename; BEGIN set_suffix (fnm, fext); END;
END. {************************************}