Article View: comp.lang.modula2
Article #154You're not my type!
From: "THE DOCTOR."
Date: Fri, 30 Jun 1989 17:04
Date: Fri, 30 Jun 1989 17:04
41 lines
1814 bytes
1814 bytes
This might be a question for the Zurich crew.
In the following module, are the types OneType and AnotherType compatible?
PIM3 seems to say they are both compatible with CARDINAL, but doesn't say
much about compatibility with each other. I tried the module in JPI
TopSpeed version 1.17, and it found nothing to complain about. I don't
think OneType and AnotherType are compatible. Are they, or should they be?
MODULE WhatType ;
(* This module was created to answer a question about Type Checking *)
TYPE
OneType = CARDINAL ;
AnotherType = CARDINAL ;
VAR
A : OneType ;
B : AnotherType ;
C : CARDINAL ;
BEGIN
(* Statement My Opinion *)
A := C ; (* Ok *)
A := A + C ; (* Ok *)
B := C ; (* Ok *)
B := B + C ; (* Ok *)
A := B ; (* No *)
A := B + A ; (* No *)
END WhatType .
+-----------------+------------------------------------------------+
Tom Ruby Disclaimer: Since I'm my own employer, the
MSRS002@ECNCDC views stated here are my own, and not
necessarily those of myself.
+-----------------+------------------------------------------------+
Observation: When a company is to big for innovation, it
resorts to litigation.
+------------------------------------------------------------------+
Technical Details
Message-ID:
<INFO-M2%89070203232565@UCF1VM>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!deimos.cis.ksu.edu!unmvax!tut.cis.ohio-state.edu!ucbvax!ECNCDC.BITNET!MSRS002Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!deimos.cis.ksu.edu!unmvax!tut.cis.ohio-state.edu!ucbvax!ECNCDC.BITNET!MSRS002
From: MSRS002@ECNCDC.BITNET ("THE DOCTOR.")
Newsgroups: comp.lang.modula2
Subject: You're not my type!
Message-ID: <INFO-M2%89070203232565@UCF1VM>
Date: 30 Jun 89 17:04:00 GMT
Sender: daemon@ucbvax.BERKELEY.EDU
Reply-To: Modula2 List <INFO-M2%UCF1VM.bitnet@jade.berkeley.edu>
Organization: The Internet
Lines: 41