On Tuesday, July 31, 2018 at 12:50:41 AM UTC+9:30, August Karlstrom wrote:
On 2017-08-20 22:59, August Karlstrom wrote:
It's too bad this cannot be done in standard Oberon. Of course you can
use open (one-dimensional) arrays and calculate element indices manually but then you also need to pass the number of columns for each matrix.
I was wrong here; Oberon actually does support open arrays of any dimension.
My first reaction was to disagree but I now see that you are right. The syntax does allow e.g. for a three-dimensional open array parameter:
PROCEDURE P(VAR a: ARRAY OF ARRAY OF ARRAY OF INTEGER);
My next question then was how would you know the length of each dimension but I suppose (?) it is just:
Dimension 0: LEN(a)
Dimension 1: LEN(a[0]);
Dimension 2: LEN(a[0, 0] or LEN(a[0][0])
Do you know of any current Oberon compilers that support open arrays that are not restricted to 1 dimension?
Regards,
Chris Burrows
CFB Software
http://www.astrobe.com
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)