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=0.7 required=5.0 tests=BAYES_00,MSGID_RANDY autolearn=no 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: 2000-12-30 16:43:15 PST Path: supernews.google.com!sn-xit-02!supernews.com!216.218.236.179.MISMATCH!news!news.he.net!news-peer.gip.net!news.gsl.net!gip.net!newsfeed.mathworks.com!news.maxwell.syr.edu!nntp2.deja.com!nnrp1.deja.com!not-for-mail From: Robert Dewar Newsgroups: comp.lang.ada Subject: Re: A big thank you to Bruce or Tracy, Robert and Ted!!!!!!! Date: Sun, 31 Dec 2000 00:34:23 GMT Organization: Deja.com Message-ID: <92luuf$4v8$1@nnrp1.deja.com> References: NNTP-Posting-Host: 205.232.38.14 X-Article-Creation-Date: Sun Dec 31 00:34:23 2000 GMT X-Http-User-Agent: Mozilla/4.61 [en] (OS/2; U) X-Http-Proxy: 1.0 x54.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 X-MyDeja-Info: XMYDJUIDrobert_dewar Xref: supernews.google.com comp.lang.ada:3482 Date: 2000-12-31T00:34:23+00:00 List-Id: In article , "Mark Pagdin" wrote: > 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? This certainly confirms my earlier guess, that you don't know enough yet to be trying to start coding. This is a VERY fundamental question. It is sort of like someone who sits down to play the piano, and first asks "I just have one question what's the difference between the pedals for my feet and the levers for my hands" :-) Well perhaps that's a little too extreme, but it is not that far off. A procedure carries out some actions, a function returns a result. This must be discussed in any elementary Ada book, furthermore, any Ada book is just FULL of examples of the two, so that's the place to look to study. What book are you using? You will simply frustrate yourself if you try to code without understanding the basics. Actually I would suggest doing a simpler excercise first (like printing out the squares of numbers from 1 to 5 using a function to compute the square). > 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? Again, any Ada book is FULL of such examples. The short answer to your question is either qualify the names fully, or use a USE statement, but I think the first step is to study examples in your text book. Then if there is something you can't understand in the text book, ask your instructor, or failing that, ask here. Sent via Deja.com http://www.deja.com/