Err2 and 3, similarly, P and Q are not declared in the main program;
Finally, CALL SORT(O, p, q) in the main program needs to assign values to these variables.
This is a sorting program. As far as the function of this program is concerned, it can only operate on the first 10 variables of array O. ..