comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Pilgrim <simon.pilgrim@baesystems.com>
Subject: Re: sort function
Date: Fri, 04 May 2001 16:05:30 +0100
Date: 2001-05-04T16:05:30+01:00	[thread overview]
Message-ID: <3AF2C53A.878B9550@baesystems.com> (raw)
In-Reply-To: 3AF2A5F8.63668DBD@brighton.ac.uk



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



  reply	other threads:[~2001-05-04 15:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-04 12:52 sort function sc297
2001-05-04 15:05 ` Simon Pilgrim [this message]
2001-05-04 16:49 ` Jeffrey Carter
2001-05-08 15:21   ` John English
2001-05-09  5:44     ` tmoran
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox