On Apr 6, 12:52 pm, Martin Whitaker <spamt...@[EMAIL PROTECTED]
>
wrote:
> 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
Dear Martin,
Very, Very, Very, Good Point. This I did not expect - though I am yet
not sure if it is the error - but it is a good point to start out.
I have in the DEF File
FROM FIO IM****T Create, Open, File, Close, WrStr, WrLn, WrLngCard,
WrCard;
And in the MOD file simply
IM****T IO;
There is no where in the MOD File where it explicitly says IM****T File
- like it does in the DEF.
This may explain why I might be getting an error in functions that
use" File" . While all the functions that give the error of not
matching the previous declaration have "File" as one of the parameters
- there are a few functions that use "File" - but yet do not give the
error.
I would check this out tomorrow.
Thanks for the tip.
O.O.


|