Search found 437 matches

by cfbsoftware
Sat Oct 08, 2011 12:06 pm
Forum: Oberon Language
Topic: Oberon 2011: CASE Statements
Replies: 1
Views: 13991

Oberon 2011: CASE Statements

Single-character strings can now be used as CASE labels as well as INTEGER constants. When the labels are strings the selector is a CHAR. The 2011 Oberon Language Report does not explicitly specify implementation details of CASE statements such as: What is the valid range of values for CASE labels? ...
by cfbsoftware
Fri Sep 30, 2011 11:30 pm
Forum: Oberon Language
Topic: Further revision of Oberon-07
Replies: 26
Views: 182398

Re: Further revision of Oberon-07

If you nominate a character as an escape character e.g. "\" then you also have to specify how to represent that escape character in the situations where you want to use it as literal character, not an escape. Typically this is done by doubling the character e.g. "\\". Unfortunately in computing cont...
by cfbsoftware
Sat Sep 24, 2011 1:21 pm
Forum: Oberon Language
Topic: CASE statement
Replies: 1
Views: 14590

Re: CASE statement

The maximum value that you can use as a label in a CASE statement in the Astrobe implementation of Oberon is 255. Refer to the Implementation Limits section in the Astrobe documentation for more information. If you really want to use a CASE statement you could rewrite your example as: lcdOrientation...
by cfbsoftware
Fri Sep 23, 2011 8:19 am
Forum: Oberon Language
Topic: Further revision of Oberon-07
Replies: 26
Views: 182398

Re: Further revision of Oberon-07

Correct. "" is not a single-character string so it cannot be assigned to a CHAR variable. Single-character strings are interpreted in either of two ways in the Astrobe Oberon 2011 compiler depending on whether the context is a CHAR or an ARRAY OF CHAR. The following example illustrates the two diffe...
by cfbsoftware
Thu Sep 22, 2011 1:34 pm
Forum: Oberon Language
Topic: Further revision of Oberon-07
Replies: 26
Views: 182398

Re: Further revision of Oberon-07

It is also worth noting that the string 0X needs special interpretation. Our interpretation of the 2011 report led to the following test program which demonstrates various ways of creating a null string: MODULE NullStr1; IMPORT Main, Out, Strings; VAR ch: CHAR; s: ARRAY 1 OF CHAR; PROCEDURE Length(...
by cfbsoftware
Thu Sep 22, 2011 8:30 am
Forum: Oberon Language
Topic: What is wrong with this code?
Replies: 2
Views: 17912

Re: What is wrong with this code?

This is most likely related to the restriction described in the section titled "Extending imported types" in Section titled "Oberon-07 Language Differences and Restrictions" in the Astrobe documentation. The solution is to split the definition of CamLib into two parts: TYPE CamLib* = POINTER TO CamL...
by cfbsoftware
Tue Sep 20, 2011 10:33 pm
Forum: Oberon Language
Topic: Oberon Day 2011 - Videos and Presentations
Replies: 0
Views: 12537

Oberon Day 2011 - Videos and Presentations

The slides (in PDF format) of the presentations given at Oberon Day 2011 in Zurich earlier this year are now available, as well as the videos, from the ETH website. The slides can be downloaded from: http://www.oberonday2011.ethz.ch/talks/ The videos can be viewed at: http://www.multimedia.ethz.ch/c...
by cfbsoftware
Sat Sep 17, 2011 1:38 pm
Forum: Oberon Language
Topic: Further revision of Oberon-07
Replies: 26
Views: 182398

Re: Further revision of Oberon-07

You previously stated that character variables are assignment compatible with open character arrays. However, I cant find any information about this in the manual. Now that I look again I can't see it either. That is a pity - I would have found it useful. That means the declaration in my CharString...
by cfbsoftware
Sat Sep 17, 2011 6:24 am
Forum: Oberon Language
Topic: Further revision of Oberon-07
Replies: 26
Views: 182398

Re: Further revision of Oberon-07

it is a central property of Oberon-07 that each literal constant (and expression) has a unique and unambiguous type Maybe so in the 2008 version but not any more. Consider the following valid Oberon-07 (2011) statements: VAR char: CHAR; charString: ARRAY 1 OF CHAR; string: ARRAY 2 OF CHAR; char := ...
by cfbsoftware
Fri Sep 16, 2011 11:16 pm
Forum: Oberon Language
Topic: Further revision of Oberon-07
Replies: 26
Views: 182398

Re: Further revision of Oberon-07

It is also interesting to note the asymmetry between the types CHAR and String In theory perhaps but in practice the differences between CHARs and strings have now all but been eliminated. The key point is that now a CHAR and a single character string are compatible. "C" is both a CHAR and an ARRAY...