Path: 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: Date: 30 Jun 89 17:04:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: Modula2 List Organization: The Internet Lines: 41 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. +------------------------------------------------------------------+