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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,697fa9e83df511c1 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-22 18:58:20 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!wn1feed!wn4feed!worldnet.att.net!204.127.198.204!attbi_feed4!attbi.com!rwcrnsc51.ops.asp.att.net.POSTED!not-for-mail From: "Steve Doiel" Newsgroups: comp.lang.ada References: Subject: Re: Help setting up an array of records X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: <%0YG8.6362$ux5.5079@rwcrnsc51.ops.asp.att.net> NNTP-Posting-Host: 12.225.227.101 X-Complaints-To: abuse@attbi.com X-Trace: rwcrnsc51.ops.asp.att.net 1022119099 12.225.227.101 (Thu, 23 May 2002 01:58:19 GMT) NNTP-Posting-Date: Thu, 23 May 2002 01:58:19 GMT Organization: AT&T Broadband Date: Thu, 23 May 2002 01:58:20 GMT Xref: archiver1.google.com comp.lang.ada:24554 Date: 2002-05-23T01:58:20+00:00 List-Id: "Matt Thomas" wrote in message news:acgcbn$sue$1@paris.btinternet.com... > I know this might be a stupid question to most of you but i have just > started using Ada. Good. I hope you eventually like the language as much as I do. > For my uni coursework i have to write a program to simulate a vending > machine. > > I'm using an array of records to represent the items in the vending machine > but I dont know how to actually get the information into my array. I need > to specify the name of the item, its cost and the quantity left. My first response is that you have at least 3 choices: Read the values from a file Ask the user to enter the values Hard code the values into the program My second response (in case you're really _just_ getting started) is with a very small sample: PRODUCT(1).PRICE := 42; I hope this helps, SteveD