gm2
[Top][All Lists]
Advanced

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

Re: Problem with import/export in local modules


From: Michael Riedl
Subject: Re: Problem with import/export in local modules
Date: Thu, 28 Mar 2024 13:21:55 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:102.0) Gecko/20100101 Thunderbird/102.11.0

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.



reply via email to

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