Page 2 of 3

Re: Updated Oberon Language Report (Revision 1.10.2013)

Posted: Wed Oct 30, 2013 2:02 pm
by augustk
As far as I understand the compatibility between the type BYTE and the type INTEGER means that e.g. for x: BYTE the statement x := x + 1 is valid but not INC(x). Is this correct?

In section 9.1 (Assignments) we are told that:
The type of the expression must be the same as that of the designator.
In the example x := x + 1 above, x + 1 has type INTEGER and x has type BYTE. Therefor I suspect that the section needs to be amended with an exception saying that an expression of type BYTE can be assigned to a variable of type INTEGER and vice versa. What do you think?

Re: Updated Oberon Language Report (Revision 1.10.2013)

Posted: Wed Oct 30, 2013 5:26 pm
by kevinhely
That's good as we had already removed it from the compiler
Heh heh! Ditto!

Re: Updated Oberon Language Report (Revision 1.10.2013)

Posted: Wed Oct 30, 2013 5:29 pm
by kevinhely
I suspect that the section needs to be amended with an exception...
I guess that's covered by
The type BYTE is compatible with the type INTEGER, and vice-versa.
in Section 6.1 of the report.

Re: Updated Oberon Language Report (Revision 1.10.2013)

Posted: Thu Oct 31, 2013 9:50 am
by augustk
Even if the types are compatible they are not "the same".

Re: Updated Oberon Language Report (Revision 1.10.2013)

Posted: Thu Oct 31, 2013 12:41 pm
by cfbsoftware
For most cases we are treating compatible as meaning the same as far as BYTE and INTEGER are concerned in the Astrobe Oberon compiler that conforms to the 1.10.2013 revision. e.g. the following are allowed where b is a BYTE and i is an INTEGER:

Code: Select all

INC(i)
INC(b)
INC(b, i)
INC(i, b)
b := i + 1
i := b + 1
i := b + i
b := i + b
Note that the shift operations LSL, LSR, ASR, ROR and SYSTEM.EOR can have parameters that are INTEGERs or BYTEs but the result is always an INTEGER.

For more information see the topic New language extension: BYTE data type

Re: Updated Oberon Language Report (Revision 1.10.2013)

Posted: Sat Mar 01, 2014 6:07 am
by cfbsoftware
kevinhely wrote:Wirth said it was an oversight to leave the "D" business in the report. It will be removed shortly.
It has now been removed.

Re: Updated Oberon Language Report (Revision 1.10.2013)

Posted: Tue Mar 11, 2014 9:23 am
by augustk
It has now been removed.
The "D" in the scale factor has bee removed from section 3, yes, but not from the grammar in the appendix. The reason for this according to Wirth is that he didn't want to "invalidate old data sets".

Re: Updated Oberon Language Report (Revision 1.10.2013)

Posted: Tue Mar 11, 2014 9:36 am
by augustk
Niklaus Wirth updated the report in February (unfortunately without changing the date). In the current revision
1. the scale factor with "D" has been partially removed
2. all kinds of variables can now be exported (in read-only mode)
3. the grammar symbol for constant declarations is now consistently named ConstDeclaration.

Have I missed anything?

Re: Updated Oberon Language Report (Revision 1.10.2013)

Posted: Wed Mar 12, 2014 10:53 am
by augustk
In yesterday's update SYSTEM procedures supported by the RISC processor was also added.

Re: Updated Oberon Language Report (Revision 1.10.2013)

Posted: Wed Mar 12, 2014 5:36 pm
by dsar
augustk wrote:Have I missed anything?
The SET type is now:
The sets of integers between 0 and an implementation-dependent limit.