I would like to make assumptuions about the input parameters of a procedure. The input parameter of the procedure should be the (1,1) element of a 2-dimensional Matrix. I make the same assumptions for the elements of the Matrix as expected by the procedure. When I call he procedure with the (1,1) element of the matrix, it gives the following error. How should I use the assumptions or how to pass correctly the parameter to the procedure in this particular case?
[x[1, 1] x[1, 2]]
X := [ ]
[x[2, 1] x[2, 2]]
> for i to 2 do:
> for j to 2 do:
Matrix(2, 2, [[x[1,1],x[1,2]],[x[2,1],x[2,2]]], datatype = anything, storage = rectangular, order = Fortran_order, shape = ): property aliased to Matrix(2, 2, [[x[1,1],x[1,2]],[x[2,1],x[2,2]]], datatype = anything, storage = rectangular, order = Fortran_order, shape = )
Originally x[1,1], renamed x~[1, 1]: is assumed to be: RealRange(0,1)
test := proc(x::RealRange(0, 1)) print(x) end proc;
Error, invalid input: test expects its 1st argument, x, to be of type RealRange(0, 1), but received `x`[1, 1]
Any comments are welcome!