Article View: comp.lang.modula2
Article #2381Oberon-M
From: Ian Macintosh
Date: Tue, 25 Jun 1991 12:54
Date: Tue, 25 Jun 1991 12:54
65 lines
2311 bytes
2311 bytes
Hi.
I've been looking at the Oberon-M package (Ver 1.10) from E.R. Videki, and have come across the following problem that does not seem right to me.
It has to do with the compatability between BYTE and CHAR. I extracted the pertinant code into a test module, and passed it through the compiler.
Here is the program:
======
MODULE TEST;
IMPORT SYSTEM;
VAR ByteArray : ARRAY 10 OF SYSTEM.BYTE;
CharArray : ARRAY 10 OF CHAR;
BEGIN
CharArray[1] := ByteArray[1];
END TEST.
======
And here are the compiler response:
======
Oberon-M Compiler (tm) PC-80x86 edition, v1.1
(c) Copyright E. R. Videki 1989,1990,1991 All rights reserved
P.O. Box 58, Morgan Hill, California 95038 U.S.A.
10: BEGIN
11: CharArray[1] := ByteArray[1];
Syntax error 50 before line 11 column 33
types not compatible
======
The way I read the ObRept file, this should not cause a problem. Here is the relevant section:
======
Module SYSTEM exports the data type BYTE. No representation of
values is specified. Instead, certain
compatibility rules with other types are given:
1. The type BYTE is compatible with CHAR and SHORTINT.
2. If a formal parameter is of type ARRAY OF BYTE, then the
corresponding actual parameter may be of any type.
======
Anybody have a simple answer for me?
I would also appreciate a pointer in the direction of some good books or articles on Oberon. If there is anything available on computer, (text files, etc), it might be easier to get hold of, as South Africa is rather far away from most places. <grin>.
Regards,
Ian.
--
uucp: uunet!m2xenix!puddle!5!7101!15.1!Ian.Macintosh
Internet: Ian.Macintosh@p1.f15.n7101.z5.fidonet.org
Technical Details
Message-ID:
<3277.28685888@puddle.fidonet.org>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!crdgw1!uunet!zephyr.ens.tek.com!tektronix!percy!m2xenix!puddle!p1.f15.n7101.z5.fidonet.org!Ian.MacintoshShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!crdgw1!uunet!zephyr.ens.tek.com!tektronix!percy!m2xenix!puddle!p1.f15.n7101.z5.fidonet.org!Ian.Macintosh From: Ian.Macintosh@p1.f15.n7101.z5.fidonet.org (Ian Macintosh) Newsgroups: comp.lang.modula2 Subject: Oberon-M Message-ID: <3277.28685888@puddle.fidonet.org> Date: 25 Jun 91 12:54:00 GMT Sender: ufgate@puddle.fidonet.org (newsout1.26) Organization: FidoNet node 5:7101/15.1 - West Rand Clan, Randfontein RSA Lines: 65