[Oberon] Question concerning Arrays

August Karlstrom fusionfive at comhem.se
Tue Apr 3 19:45:00 MEST 2007


Eric skrev:
> Hi all,
> 
> In Java one can assign an array value to an array variable like so:
> 
> int[] A = {0,1,2}
> 
> Can one write something similar in Oberon?

No, there are no array literals/initializers in Oberon, you have to do:

VAR A: ARRAY 3 OF INTEGER;
...
A[0] := 0; A[1] := 1; A[2] := 2;

In this respect, I think maybe the minimalist approach of Oberon went to 
far.


August


More information about the Oberon mailing list