ok, thanks again.
the fragment of code I show is as an example. Obviously in real scenario the implementation shall include matrix size control, etc...
At the begin, the code is just to be used inside the same matrix (reagular matrix ie rectangular), but now you have mentioned the row swap between different matrix, I did not check, but the pointer mechanism, with the needed controls, should be still applicable, I'll give a look at this case as soon as possible.