Oberon Community Platform Forum
October 23, 2019, 03:15:02 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: 1 ... 5 6 [7]
  Print  
Author Topic: Four questions about Oberon-07  (Read 62104 times)
kevinhely
Newbie
*
Posts: 44


« Reply #90 on: January 26, 2013, 06:21:16 PM »

Latest news: that new rule for array assignment is revoked. For array assignment x := y, Prof. Wirth states:

Quote
length of x must be not less than length of y.
Logged
cfbsoftware
Full Member
***
Posts: 107


WWW
« Reply #91 on: January 27, 2013, 03:03:18 AM »

Latest news: that new rule for array assignment is revoked. For array assignment x := y, Prof. Wirth states:

Quote
length of x must be not less than length of y.
Sounds like we are back to square one i.e. as described in exception #2 of Section 9.1 "Assignments" of the 2007 / 2008 revisions of the Oberon Language Report:

Quote
2. Arrays must have the same element type, and the length of the destination array must not be
less than the length of the source array.

This is consistent with the sort of behaviour that is described in detail (with examples of the code generated) in section 17. "Assignment of Arrays" of the document "An Oberon Compiler for the ARM Processor":

http://www.inf.ethz.ch/personal/wirth/Articles/Oberon.html
Logged

Chris Burrows
Astrobe v7.0 (Feb 2019): Oberon for ARM Cortex-M3, M4 and M7 Microcontrollers
http://www.astrobe.com
kevinhely
Newbie
*
Posts: 44


« Reply #92 on: January 27, 2013, 11:44:32 AM »

Sounds like we are back to square one i.e. as described in exception #2 of Section 9.1 "Assignments" of the 2007 / 2008 revisions of the Oberon Language Report

Indeed it does. Alas, the exception is not present in the latest (22.9.2011) version...
Logged
augustk
Newbie
*
Posts: 2


« Reply #93 on: February 04, 2013, 05:34:16 PM »

As a (very) minor note, I also hope that the upcoming revision of the language report will have corrected the jarring italic left parenthesis after the Einstein quote.
Logged
augustk
Newbie
*
Posts: 2


« Reply #94 on: February 16, 2013, 12:05:24 PM »

Below are a couple of pointer declarations where it is also hard to tell from the language report whether declaration two and three is valid or not (this was brought up by me in comp.lang.oberon some time ago).

TYPE
        P0 = POINTER TO RECORD END;
        P1 = POINTER TO RECORD (P0) END;
        P = POINTER TO RECORD x: P END;


Section 26.1 and 26.3 of "An Oberon Compiler for the ARM Processor" by Niklaus Wirth confirm that they are indeed valid.

http://www.inf.ethz.ch/personal/wirth/Articles/Oberon/Oberon.ARM.Compiler.pdf
Logged
Pages: 1 ... 5 6 [7]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!