|
From: | Fischlin Andreas |
Subject: | Re: Problems with Procedure Type |
Date: | Mon, 28 Jun 2021 07:19:45 +0000 |
Dear Derek,
Just a few comments on your code regardless of any difficulties you may have encountered:
DEFINITION MODULE Test_Suite;
TYPE Test_Suite; TYPE Run_Type; PROCEDURE construct(VAR instance: Test_Suite; run_proc_instance: Run_Type); PROCEDURE run(instance: Test_Suite); END Test_Suite.
DEFINITION MODULE Test_Suite;
TYPE Test_SuiteOpaque; TYPE Run_Type; PROCEDURE Construct(VAR instance: Test_SuiteOpaque; run_proc_instance: Run_Type); PROCEDURE Run(instance: Test_SuiteOpaque); END Test_Suite.
I makes no sense and is actually against M2 syntax to use the identifier of a module for any other purpose, here defining an opaque type. I hope any attempt to compile such a code is not accepted. Then it is advisable to capitalise types and procedures
while starting identifiers of variables and constants in lower case. Makes recognition of type much easier throughout the code. All my comments on the definition module apply of course in analogy also to the implementation module where you made the same mistake.
All the best.
Sincerely yours, Andreas Fischlin
ETH Zurich
Prof. em. Dr. Andreas Fischlin
IPCC Vice-Chair WGII
Systems Ecology - Institute of Biogeochemistry and Pollutant Dynamics
CHN E 24
Universitaetstrasse 16
8092 Zurich
SWITZERLAND
+41 44 633-6090 phone
+41 44 633-1136 fax
+41 79 595-4050 mobile
Make it as simple as possible, but distrust it!
________________________________________________________________________
|
[Prev in Thread] | Current Thread | [Next in Thread] |