comp.lang.ada
 help / color / mirror / Atom feed
From: "Marin David Condic" <dont.bother.mcondic.auntie.spam@[acm.org>
Subject: Re: help setting up an array of records
Date: Tue, 28 May 2002 11:01:41 -0400
Date: 2002-05-28T15:01:42+00:00	[thread overview]
Message-ID: <ad064m$j5k$1@nh.pace.co.uk> (raw)
In-Reply-To: acr1ci$rd3$1@knossos.btinternet.com

Just guessing from what you are saying, that this appears in the declarative
part of the program. What you've got is an executable statement and it
belongs in the executable part of the program. Try putting it after the
"begin" and see if it gets better. (BTW, there *is* a way to initialize the
array in the declarative part of the program, but you've got to do it with
an aggregate at the point where the object is declared. Try it with the
statement you've got now first & if you want to try it another way, post
here again and maybe we can point you at an appropriate reference.)

MDC
--
Marin David Condic
Senior Software Engineer
Pace Micro Technology Americas    www.pacemicro.com
Enabling the digital revolution
e-Mail:    marin.condic@pacemicro.com


"Matt Thomas" <matt_ontheroad@hotmail.com> wrote in message
news:acr1ci$rd3$1@knossos.btinternet.com...
>
>
> >
> >    MACHINE_SLOTS  :   constant := 6; --
> >
> >    type PRODUCT_TYPE is
> >       record
> >             NAME      :   STRING (1..12);
> >             LEN       :   POSITIVE;
> >             PRICE     :   INTEGER;
> >             QUANTITY  :   INTEGER;
> >       end record;
> >
> >    type PRODUCT_TYPE_ARR is array (1..MACHINE_SLOTS) of PRODUCT_TYPE;
> >
> >    PRODUCT   :   PRODUCT_TYPE_ARR;
>
> --setting up the array
> PRODUCT(1) := ("Cola        ",4,60,5);
>
>
> Yes I put that line in the code just below the the rest of the code I had
> written.
>
>
>





  reply	other threads:[~2002-05-28 15:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-26 13:00 help setting up an array of records Matt Thomas
2002-05-26 13:18 ` Preben Randhol
2002-05-26 13:24   ` Preben Randhol
2002-05-26 16:10     ` Matt Thomas
2002-05-28 15:01       ` Marin David Condic [this message]
2002-05-26 16:16 ` Matt Thomas
2002-05-26 19:53   ` Preben Randhol
  -- strict thread matches above, loose matches on Subject: below --
2002-05-22 15:09 Help " Matt Thomas
2002-05-22 16:39 ` Stephen Leake
2002-05-22 17:18 ` Marin David Condic
2002-05-22 17:32 ` Mark Johnson
2002-05-22 19:15 ` Preben Randhol
2002-05-23  1:58 ` Steve Doiel
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox