Hi, I have a file of stock for clothes. The file contains records with the fields of a barcode which is string and the sizes of the products in an array of [1..5] of longint. Array is small, Array is Medium etc. The records are displayed in the file as shown in the following image :
The file represents stock as it is purchased. Therefore more products may be added to it of different/same sizes and barcodes. Each individual item creates a new record whether it be a new size or barcode for example if you have two products of the same barcode and size it stores them as two records. I need a procedure which sorts the records into ascending order of the barcodes and combines the sizes to one record and marks the others for deletion so that the file is like the one in the image below:
-1 means its marked for deletion
i was told i need to do a nested while loop. However i was unable to get it to work
thank you, all help appreciated.
It looks like you're new here. If you want to get involved, click one of these buttons!