I am using undetemined two dimension array as Routine input parameter, e.g, to do matrix multiply operation, I need to know the length of A,B before FOR...ENDFOR.
I try to use built-ins ARRAY_LEN() to do this, but it turns out it only return the length of first dimension. so is there any way to get it`s two dimension length of array?
--MULIPLICATION
ROUTINE ARY_MULT(A,B:ARRAY [*,*] OF REAL ):ARRAY [*,*] OF REAL
VAR
C:ARRAY [*,*] OF REAL
l:INTEGER
BEGIN
l = ARRAY_LEN(A)
--A first dimension length
FOR i =1 TO l DO
--B second dimension length
FOR j =1 TO l DO
C[i,j]=0
--A second dimension length
FOR k=1 TO l DO
C[i,j]=C[i,j]+A[i,k]*B[k,j]
ENDFOR
ENDFOR
ENDFOR
RETURN (C)
END ARY_MULT
thanks