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,382901ab8b321c3a X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-01-06 18:20:03 PST Path: supernews.google.com!sn-xit-03!supernews.com!newsfeed.gamma.ru!Gamma.RU!skynet.be!news.vas-net.net!server2.netnews.ja.net!newshost.central.susx.ac.uk!news.bton.ac.uk!not-for-mail From: John English Newsgroups: comp.lang.ada Subject: Re: A big thank you to Bruce or Tracy, Robert and Ted!!!!!!! Date: Sun, 07 Jan 2001 01:29:54 +0000 Organization: University of Brighton Message-ID: <3A57C692.A7BC1C5C@brighton.ac.uk> References: NNTP-Posting-Host: dialin-b7.bton.ac.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: saturn.bton.ac.uk 978830569 23133 194.81.199.187 (7 Jan 2001 01:22:49 GMT) X-Complaints-To: news@bton.ac.uk NNTP-Posting-Date: 7 Jan 2001 01:22:49 GMT X-Mailer: Mozilla 4.6 [en] (Win95; I) X-Accept-Language: en,pdf Xref: supernews.google.com comp.lang.ada:3734 Date: 2001-01-07T01:22:49+00:00 List-Id: Mark Pagdin wrote: > I appreciate all your comments. I have been reading about Ada, Arrays etc > but I find i learn from actually doing things, not just reading about them. > I don't really want to lose face with my lecturer/plus he probably has 80 > emails from desperate students like me, hence turning to you guys for help. Ooh. You will probably find that your lecturer will be gratified to discover that you've learned to ask questions when you don't understand something. There's nothing more frustrating than talking to an unresponsive class who don't stop you and ask questions, but when you ask them questions you find that they haven't understood anything you said since the bit where you said "Good morning" last Monday. At Brighton we run "sandwich" courses where students do a year in industry between their 2nd and final years. One of the most rewarding results is that they come back for their final year and ask questions, rather than sitting on their hands and thinking "I must be stupid..." !!! If you look around this (and other) groups, you'll find that most people here have asked the world to help when they've got stumped by something. Nothing to be ashamed of at all. > 2 qns, about general Ada: > > a) When does one use a function or a Procedure. I know it is to do with one > not giving an output or something but can anyone give an example of when to > use one rather that another? Procedure: use as a statement: Do_This (Blah, Blah, Blah); Function: use as an expression: This := Do_That(Blah, Blah) + The_Other; > b)I use Gnat IDE and I was recomended by my lecturer to use packages and > then procedures/functions in that package can be called. So when i want to > write the Main Program (is that what you call it?) i say "with Mark;" if > Mark is the package and then just write a procedure that calls the names of > the procedures and functions from the package? Yes. For example, this will work: with Mark; procedure My_Main_Program is begin Mark.Do_This; -- call the procedure Do_This in package Mark end My_Main_Program; Another way to say the same thing: with Mark; use Mark; procedure My_Main_Program is begin Do_This; -- call the procedure Do_This in package Mark end My_Main_Program; > If you can understand what i just wrote then you deserve an MBE. Oh, thank you... :-) ----------------------------------------------------------------- John English | mailto:je@brighton.ac.uk Senior Lecturer | http://www.comp.it.bton.ac.uk/je Dept. of Computing | ** NON-PROFIT CD FOR CS STUDENTS ** University of Brighton | -- see http://burks.bton.ac.uk -----------------------------------------------------------------