gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gm2] Exporting and Importing amongst inner modules


From: john o goyo
Subject: [Gm2] Exporting and Importing amongst inner modules
Date: Mon, 2 Jun 2014 19:14:50 -0400

Thie following problem occurs with gm2-4.1.2 (given that I am currently stuck building mpfr). I cannot remember if this was reported before and I could not find anything on the mailing list.

Symbols exported from one inner module are not seen within a second inner module. Example code follows.


MODULE InnerModules;
  (*-------------------------*)
  MODULE FirstInner;

  EXPORT One;  (* Not seen by gm2 *)

  PROCEDURE One() :CARDINAL;
  BEGIN
    RETURN 1;
  END One;

  END FirstInner;

  (*-------------------------*)
  MODULE SecondInner;

  FROM FirstInner IMPORT One; (* Will not compile *)

  EXPORT Two;

  PROCEDURE Two() :CARDINAL;
  BEGIN
    RETURN FirstInner.One() + FirstInner.One()
  END Two;

  END SecondInner;

VAR
  n :CARDINAL;
BEGIN
  n := Two()
END InnerModules.


john



reply via email to

[Prev in Thread] Current Thread [Next in Thread]