Replies: 3 comments 4 replies
-
On 26 Feb 2023, at 20:00, Duke Normandin wrote:
in a <proj-name>/src directory, I have:
MyModule.i3
MyModule.m3
Main.m3
In Main.m3 I have IMPORTS MyModule;
I run cm3 from <proj-name> directory
I'm doing something wrong!
You’re missing the line declaring your module:
module(“MyModule”)
… ```
--- building in AMD64_LINUX ---
new source -> compiling Main.m3
"../src/Main.m3", line 4: unable to find interface (MyModule)
1 error encountered
m3front failed compiling: ../src/Main.m3
```
```
cat src/m3makefile
import("libm3")
implementation("Main")
program("myModule")
```
--
Reply to this email directly or view it on GitHub:
#1157
You are receiving this because you are subscribed to this thread.
Message ID: ***@***.***>
--
Olaf Wagner -- elego Software Solutions GmbH -- http://www.elegosoft.com
Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
phone: +49 30 23 45 86 96 mobile: +49 177 2345 869 fax: +49 30 23 45 86 95
Geschäftsführer: Olaf Wagner | Sitz: Berlin
Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194
|
Beta Was this translation helpful? Give feedback.
2 replies
-
Making headway - but not there yet.
Do you need to see the implementation module? |
Beta Was this translation helpful? Give feedback.
0 replies
-
change
MyModule.MakeThing(firstName, 76);
MyModule.PrintThing();
to
WITH thing = MyModule.MakeThing(firstName, 76) DO
MyModule.PrintThing(thing)
END
(you need to pass the result of the MakeThing to the PrintThing)
Alternatively you could write
MyModule.PrintThing(MyModule.MakeThing(firstThing, 76))
…On Sun, Feb 26, 2023 at 2:12 PM Duke Normandin ***@***.***> wrote:
Making headway - but not there yet.
"../src/Main.m3", line 11: Expression is not a statement
"../src/Main.m3", line 12: parameter not specified (2.3.2): (r)
MODULE Main;
(* IMPORT IO;*)
IMPORT MyModule;
VAR firstName: TEXT := "Duke";
BEGIN
MyModule.MakeThing(firstName, 76);
MyModule.PrintThing();
END Main.
INTERFACE MyModule;
CONST MaxEntries = 53;
TYPE
Thing = RECORD
name: TEXT;
size: INTEGER
END;
PROCEDURE PrintThing(READONLY r: Thing);
PROCEDURE MakeThing(n: TEXT; s: INTEGER): Thing;
END MyModule.
Do you need to see the implementation module?
—
Reply to this email directly, view it on GitHub
<#1157 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABKYNJNXDJ7OJECKSORGEDDWZPINPANCNFSM6AAAAAAVITZ57Y>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
in a /src directory, I have:
MyModule.i3
MyModule.m3
Main.m3
In Main.m3 I have IMPORTS MyModule;
I run cm3 from directory
I'm doing something wrong!
Beta Was this translation helpful? Give feedback.
All reactions