From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e387e3de20c4f9c5 X-Google-Attributes: gid103376,public From: Robert Dewar Subject: Re: Help? Date: 1999/11/22 Message-ID: <81bnsm$33n$1@nnrp1.deja.com>#1/1 X-Deja-AN: 551640224 References: <38382bef.0@silver.truman.edu> X-Http-Proxy: 1.0 x43.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Mon Nov 22 15:35:49 1999 GMT X-MyDeja-Info: XMYDJUIDrobert_dewar Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (OS/2; I) Date: 1999-11-22T00:00:00+00:00 List-Id: In article <38382bef.0@silver.truman.edu>, "Matthew Lawrence" wrote: > Hello to all > > I have a question that I'm sure will seem incredibly simple to > most of you but I'm a first semester computer science major > and it is giving me some trouble. > > 2) How would I access individual fields of the records that > are stored in the array? > > I've scoured my textbook for any help but must be looking in > the wrong places. Your real problem here is that you are probably reading the text book at the wrong level of abstraction. You will not find something specific in the text book that answers question 2) above, but you WILL find a) how to access elements of an array b) how to access fields of a record The point is to understand that the answer to your question is simply a matter of comprehending that the answer to a) and b) must be composed to provide the answer to 2). E.g. in this case a) use the notation array_var (subscript) b) use the notation record_var.record_field Answer to your question 2 array_var (subscript).record_field Think of it this way, suppose Ada has 100 features of this type. What we want in the text book is a clear description of the 100 features. It is up to you to combine them. You can't expect to find in your text book specific help for "how do I combine features 2, 34 and 71". A text book that provided this kind of coverage would have to have 2**100 sections, which is a large number :-) I find that this inability to abstract from documentation is one of the most common failings. It is one of the reasons why so many people come to depend on examples, because the examples often show (in a very limited manner) how to combine features. Sent via Deja.com http://www.deja.com/ Before you buy.