I need to use a N by M matrix to manage a set of integers and have been thinking of objects created using the array2{integer}::newatomic constructor. To understand how this works I have done the following test, expecting to get a runtime error to the effect that position 0,0 is not set. Instead I got a 0, which is in the range of the integers I am managing.
Code: Select all
run():-
X= array2M{integer}::newAtomic(2,2),
I = X:get(0,0), %I expected an exception at this point
stdio::write(I),
stdio::readChar()=_.
Code: Select all
X= array2M{integer}::newAtomic(2,2, -1)
Better still, may I suggest the new predicate, say,
Code: Select all
isErroneous:(positive X, positive Y) determ