Jump to content
Excelsior Forums


  • Content count

  • Joined

  • Last visited


Community Reputation

0 Neutral

About akarl

  • Rank
  • Birthday 01/01/1
  1. akarl

    Empty String as Character Literal

    OK, so you seem to agree. OOC follows the same (correct) behavior as POW in this respect. Actually, a string in Oberon *is not* an array of characters (on the language definition level), it's a distinct type that can only be instantiated by a string literal and individual characters cannot be accessed. On the other hand an array of characters can *contain* a string, be compared to a string etc. August
  2. In XDS the empty string is interpreted as 0X in character contexts, but the Oberon-2 report says: "A string of length 1 can be used wherever a character constant is allowed and vice versa." Comments? August
  3. akarl

    Is this a known compiler bug?

    If we follow your argument it shouldn't be possible to do the following either. $ cat M0.ob2 MODULE M0; TYPE T0* = POINTER TO T0Desc; T0Desc* = RECORD END; PROCEDURE (self: T0) P; END P; END M0. $ cat M1.ob2 MODULE M1; IMPORT M0; TYPE T1* = POINTER TO T1Desc; T1Desc* = RECORD (M0.T0Desc) END; PROCEDURE (self: T1) P*; END P; END M1.
  4. [src]$ cat Module.ob2 MODULE Module; TYPE T0* = POINTER TO T0Desc; T0Desc* = RECORD n: LONGINT END; END Module. [src]$ cat Test.ob2 MODULE Test; IMPORT Module; TYPE T1 = POINTER TO T1Desc; T1Desc = RECORD (Module.T0Desc) n: LONGINT END; END Test. [kalle src]$ xc =m Test.ob2 O2/M2 development system v2.51 TS © 1999-2003 Excelsior, LLC. (build 10.05.2005) XDS Oberon-2 v2.40 [x86, v1.50] - build 10.05.2005 Compiling "Module.ob2" no errors, no warnings, lines 7, time 0.00, new symfile XDS Oberon-2 v2.40 [x86, v1.50] - build 10.05.2005 Compiling "Test.ob2" * [Test.ob2 6.10 E022] * identifier "n" was already defined at Test.ob2[6.10] $n: LONGINT errors 1, no warnings, lines 8, time 0.01 ------------------------------------------------------------------- files: 2 errors: 1(0) lines 15 time: 0:00 speed 10000 l/m