摘要 |
PURPOSE:To minimize a work area by comparing data which are inputted successively on the basis of the predetermined size of an array and setting smaller data in the prescribed work area. CONSTITUTION:The value of input data is set in a comparison area A. The 1st data, however, is set in a comparison area B. The data in the areas B and A are compared with each other and when it is confirmed that the data in the area B is smaller or equal, the value in the area B is set in a buffer 0 and the value in the area A is moved to the area B. When the value of the area A is smaller than the value in the area B, it is confirmed that the (n)th byte of the word data in the area A is smaller than the word data in the area B, and the word is set in a buffer (n). Said operation is repeated up to the final data and the data are all sorted in buffers 0-(n) in predetermined array order.
|