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.

two dimensional arrays

I am trying to write a two dimensional array for a mail order company wher:
MX% = 100(max number of records)
FD% = 5 (number of fields)
RC% = count of records on file
The program must sort the records into ascending order by using one of the key fields. I must be able to input the number of the field which is the key field.
I can either input the records or read from data.
An example of a record is 1000,smith,01675839,5000,2000
Wher the 5 fields are :account number,name,telephone number,credit limit,amount owing.

Any help would be much appreciated
many thanks
Adrian



Comments

  • : I am trying to write a two dimensional array for a mail order company wher:
    : MX% = 100(max number of records)
    : FD% = 5 (number of fields)
    : RC% = count of records on file
    : The program must sort the records into ascending order by using one of the key fields. I must be able to input the number of the field which is the key field.
    : I can either input the records or read from data.
    : An example of a record is 1000,smith,01675839,5000,2000
    : Wher the 5 fields are :account number,name,telephone number,credit limit,amount owing.
    :
    : Any help would be much appreciated
    : many thanks
    : Adrian
    :
    :

    Are you sure you want to use BASIC ?!

    make record like this:

    TYPE myRecord
    accnum as integer
    name as string * 100 '(max. characters)
    telnum as string * 20
    climit as integer
    owing as integer
    END TYPE

    ' this creates an 2-D array of myRecord
    dim myArray(20,20) as myRecord

    if you have to create array on the fly, it would work too

    dim myArray(width,height) as myRecord




Sign In or Register to comment.