two dimensional arrays - Programmers Heaven

Howdy, Stranger!

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

Categories

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.