🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #2394

OBERON-M

#2394
From: James Meyer
Date: Fri, 28 Jun 1991 20:44
36 lines
1585 bytes
IM>BEGIN
IM>  CharArray[1] := ByteArray[1];
IM>END TEST.
IM>======
IM>
IM>And here are the compiler response:
IM>
IM>======
IM>11:   CharArray[1] := ByteArray[1];
IM>Syntax error 50 before line 11 column 33
IM>types not compatible
IM>======
IM>
IM>          Module SYSTEM exports the data type BYTE. No representation of
IM>          values is specified. Instead, certain
IM>          compatibility rules with other types are given:
IM>
IM>          1.  The type BYTE is compatible with CHAR and SHORTINT.
IM>          2.  If a formal parameter is of type ARRAY OF BYTE, then the
IM>              corresponding actual parameter may be of any type.
IM>
IM>======
IM>
IM>Anybody have a simple answer for me?

Ian,
   Just because BYTE is compatable with CHAR doesn't necessasarily
imply the reverse.  Any CHAR may be a BYTE as well.  But any BYTE
might not be a CHAR.  Have you tried to assign CharArray
to ByteArray?  Reverse of the assignment in your example.

Jim

--  
uucp: uunet!m2xenix!puddle!151!223!James.Meyer
Internet: James.Meyer@f223.n151.z1.fidonet.org
Technical Details
Message-ID: <121.286D9F94@puddle.fidonet.org>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!batcomputer!cornell!uw-beaver!zephyr.ens.tek.com!tektronix!percy!m2xenix!puddle!f223.n151.z1.fidonet.org!James.Meyer

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!batcomputer!cornell!uw-beaver!zephyr.ens.tek.com!tektronix!percy!m2xenix!puddle!f223.n151.z1.fidonet.org!James.Meyer
From: James.Meyer@f223.n151.z1.fidonet.org (James Meyer)
Newsgroups: comp.lang.modula2
Subject: OBERON-M
Message-ID: <121.286D9F94@puddle.fidonet.org>
Date: 28 Jun 91 20:44:10 GMT
Sender: ufgate@puddle.fidonet.org (newsout1.26)
Organization: FidoNet node 1:151/223 - Psychotronic BBS, Durham NC
Lines: 36