Path: utzoo!attcan!uunet!ginosko!brutus.cs.uiuc.edu!usc!ucsd!ogccse!cvedc!nosun!qiclab!m2xenix!randy
From: randy@m2xenix.UUCP (Randy Bush)
Newsgroups: comp.lang.modula2
Subject: Re: Question on Logitech Type Conversion
Keywords: Logitech, Type Conversion, Opaque types
Message-ID: <393@m2xenix.UUCP>
Date: 30 Sep 89 06:51:54 GMT
References: <35093@apple.Apple.COM>
Reply-To: randy@m2xenix.UUCP (Randy Bush)
Organization: Pacific Systems Group, Portland Oregon US
Lines: 25

In article <35093@apple.Apple.COM> lins@Apple.COM (Chuck Lins) writes:
> DEFINITION MODULE Items;
> TYPE Item;
> END Items.
> ...
> PROCEDURE CharCompare (left:Item; right:Item): Relation;
> VAR leftChar : CHAR;
> BEGIN
>   leftChar := CHAR(left); (* error: 'uncompatible types in conversion' *)

But, the type transfer CHAR(left) requires that left occupy the same number of
bits as a CHAR, and this would not seem to be the case here, where left would
seem to be a pointer.

Also, the importing module would seem to be trying to peek through the opaque
if it tried something like CHAR(left^).

>This all compiles fine under JPI's TopSpeed Modula-2.

This may not be to their credit.

-- 
uunet!tektronix ----\
sun!nosun --------- qiclab ---- m2xenix!randy    or    randy@m2xenix.uucp
uunet!oresoft ------------------/