Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Program for Transaction at a till

mrmrk123mrmrk123 Posts: 2Member
edited December 2013 in Pascal

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[1] is small, Array[2] is Medium etc. The records are displayed in the file as shown in the following image :

http://postimg.org/image/ep71zfqot/

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:

http://postimg.org/image/y8sk6dg1p/

-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.

Comments

  • mariahsharpmariahsharp Posts: 43Member

    "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:" i did not understand this about barcode ,i think you should get more information about the character about barcode

Sign In or Register to comment.