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,f551137f17ab163f X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-05-04 08:05:39 PST Message-ID: <3AF2C53A.878B9550@baesystems.com> Date: Fri, 04 May 2001 16:05:30 +0100 From: Simon Pilgrim Organization: BAE SYSTEMS Avionics Ltd X-Mailer: Mozilla 4.5 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: sort function References: <3AF2A5F8.63668DBD@brighton.ac.uk> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: rc3960.rochstr.gmav.gecm.com X-Trace: 4 May 2001 15:57:37 GMT, rc3960.rochstr.gmav.gecm.com Path: newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!colt.net!dispose.news.demon.net!demon!btnet-peer0!btnet-feed5!btnet!newreader.ukcore.bt.net!pull.gecm.com!rc3960.rochstr.gmav.gecm.com Xref: newsfeed.google.com comp.lang.ada:7156 Date: 2001-05-04T16:05:30+01:00 List-Id: sc297 wrote: > > help . ive written a sort funtion, but for the life of me i cant work > out what i have done wrong. help me ada people > > with ada.text_io, ada.integer_text_io; > use ada.text_io, ada.integer_text_io; > > procedure sort( Data: in out Vector ) is > Type Vector is array( Positive Range <> ) of Integer; You need to declare Vector before you use it. You could wrap it all in a package, but this will only get it to compile. To make something useful, you need to get some data into Data (BTW it is best to avoid such generic names for types and variables to avoid confusion). >From the look of your program, I guess you aren't too familiar with text_io. Have a look at the examples on www.adapower.com and if you are still baffled, go and ask your lecturer for help. They probably already know you've posted here since at least one of the staff from Brighton is a regular poster here. Try and be more specific with your problem descriptions. Most of the people in this NG use Ada for their jobs and only read the NG while at work, so make it easy for us to help you. -- Regards, Simon Pilgrim BAE SYSTEMS, Civil Flight Controls, Rochester UK