Aside: correct use of subscripts
In the assignment:
a[i, j] -= col[i] * col[j`];
j is a location in the range x. The array col has a different, collapsed range.
This is not a “type” error, but it would be trapped as a runtime exception. Like ordinary array-bound checking.