O. Olson wrote:
> On Apr 6, 3:22 am, Marco van de Voort <mar...@[EMAIL PROTECTED]
> wrote:
>> No. The example you give is perfectly valid.
>>
>> Typically that means that one of the types are defined differently,
either
>> in the .def _after_ the declaration or by one of the modules im****ted
in the
>> implementation.
>>
>
> Thanks Marco for clarifying this. This means I have a problem that is
> complier specific that I would post to the XDS Forums.
>
> I don't know what I am doing wrong - because I have copied the
> Procedure declaration from the DEF File to the MOD File to ensure that
> they are the same. I have also searched in each of the remaining file
> to ensure that this procedure is not re-declared.
>
I think you've misunderstood Marco's point. Consider the following
example:
DEFINITION MODULE x;
FROM y IM****T File;
PROCEDURE DoSomething(f:File);
END x.
IMPLEMENTATION MODULE x;
FROM z IM****T File;
PROCEDURE DoSomething(f:File);
BEGIN
END DoSomething;
END x.
The compiler would reject this unless y.File and z.File are aliases to the
same
type. Be aware that Modula-2 matches types by name, not by structure, e.g.
if
both y and z contained type definitions like:
TYPE File = RECORD
Name : ARRAY [0..127] OF CHAR;
Handle : CARDINAL
END;
y.File and z.File would be treated as different types, even though they
are
structurally identical.
Hope this helps,
Martin


|