[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gm2] Importing into a local module from another local module
From: |
john o goyo |
Subject: |
[Gm2] Importing into a local module from another local module |
Date: |
Fri, 16 Dec 2011 15:16:45 -0500 |
User-agent: |
Thunderbird 2.0.0.14 (X11/20080531) |
An identifier exported from one local module is not found in the second
local module. The code below fails to compile (in PIM mode) with the
following error message.
failed to find definition module localSum2.def
I believe this to be incorrect behaviour.
john
===[LocalModule.mod]===
MODULE LocalModule;
(*
* Importing into a local module from another local module.
*)
MODULE localSum2;
EXPORT sum2;
PROCEDURE sum2(a, b :INTEGER) :INTEGER;
BEGIN
RETURN a + b
END sum2;
END localSum2;
MODULE localSum3;
FROM localSum2 IMPORT sum2;
EXPORT sum3;
PROCEDURE sum3(a, b, c :INTEGER) :INTEGER;
BEGIN
RETURN sum2(a, sum2(b, c));
END sum3;
END localSum3;
VAR
x :INTEGER;
BEGIN
x := sum3(2, 3, 4)
END LocalModule.
===[end]===
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gm2] Importing into a local module from another local module,
john o goyo <=