How to read address using an Array - Programmers Heaven

Howdy, Stranger!

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

Categories

How to read address using an Array

rodneybunkleyrodneybunkley Posts: 5Member
How do I read an address using an Array??
How do I read something like this:

425 LOS VERDES DR

using an array? Do I do a separate array for characters and one for integers?

Comments

  • _Atex__Atex_ Posts: 163Member
    : How do I read an address using an Array??
    : How do I read something like this:
    :
    : 425 LOS VERDES DR
    :
    : using an array? Do I do a separate array for characters and one for
    : integers?
    :

    You'll need a [b]record[/b] instead of an array to store different types of data in one "package", e.g.[code]type address=record
    house_number:word;
    street_name:string;
    end;[/code]Then use this record in an array to store multiple addresses[code]var a:array[1..20] of address;

    {...}

    a[1].house_number:=425;
    a[1].street_name:='LOS VERDES DR';[/code]
Sign In or Register to comment.