Michael Riedl <udo-michael.riedl@t-online.de> writes:
John,
if you change the sequence of the EXPORT and IMPORT statement it
should work - not sure if there is is somewhere defined in PIM or ISO,
but in my library I always have IMPORT before EXPORT as well.
Gruß / Greetings
Michael
Am 28.03.24 um 01:05 schrieb john o goyo:
MODULE Test;
PROCEDURE Double(n :CARDINAL) :CARDINAL;
BEGIN
RETURN 2*n
END Double;
MODULE Inside;
EXPORT Quadruple;
IMPORT Double;
PROCEDURE Quadruple(k :CARDINAL) :CARDINAL;
BEGIN
RETURN Double(k) * Double(k)
END Quadruple;
END Inside;
VAR
d :CARDINAL;
BEGIN
d := Quadruple(3)
END Test.
Hi Michael and John,
the error message has been improved in the gcc git:
$ gm2 localmodule2.mod
localmodule2.mod:13:3: error: In inner module ‘local’: an IMPORT statement must
preceed an EXPORT statement
13 | IMPORT mult2 ;
| ^~~~~~
thanks for the bug report!
regards,
Gaius