comp.lang.ada
 help / color / mirror / Atom feed
From: "chris.danx" <chris.danx@ntlworld.com>
Subject: Re: Please give me some hints...
Date: Sat, 17 Mar 2001 23:10:35 -0000
Date: 2001-03-17T23:10:35+00:00	[thread overview]
Message-ID: <F9Ss6.10313$bL.826604@news6-win.server.ntlworld.com> (raw)
In-Reply-To: STRs6.10259$bL.819321@news6-win.server.ntlworld.com

One thing i forgot.  You can't use a variable for the the array bounds in
many circumstances -- though there are some but your a beginner, right?.
Maybe you should use a constant for this.  I tried this by making
num_of_integer a constant but it wouldn't compile, so i fixed the array
bounds and tried to compile it.  It didn't work!

What i would suggest is you look at your spec.  If i understand your program
correctly you ask for the min/max numbers which are used to calculate
num_of_integers.  This then seems to be used as if it were the bounds of the
array.  You know there will be five number so this seems unneccessary.  If
your intention was to do something else, you may need to revise your
design -- be it on paper or in your head.


Hope this is helpful,
Chris Campbell

"chris.danx" <chris.danx@ntlworld.com> wrote in message
news:STRs6.10259$bL.819321@news6-win.server.ntlworld.com...
> Look at line 9 'num_of_integer', then look at line 12.
> Then look at the warnings given by the compiler.
>
> If you do this you'll be able fix it.
>
> One hint: when an exception is raised the line number is given.  Use this
to
> track it down.  In this case it was line 12.
>
>
> Chris Campbell
>
>
> "WWM" <wwminirl@hotmail.com> wrote in message
> news:9909pn$19j2@tech.port.ac.uk...
> > I have written a program: input 2 integers, output sorted integers
> > one-by-one by descending order. e.g.
> >
> >
> > Input an integer: 2
> > Input another one: 7
> >
> > The sorted integer is:  7  6  5  4  3  2
> >
> >
> >
> > The problem is, when I run it, it says: STORAGE_ERROR
> >
> > Can any one help???
> >
> >
> >
> >
> >
>
>





  reply	other threads:[~2001-03-17 23:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <9909pn$19j2@tech.port.ac.uk>
2001-03-17 22:51 ` Please give me some hints chris.danx
2001-03-17 23:10   ` chris.danx [this message]
2001-03-21 18:18 ` Stephen Leake
replies disabled

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