comp.lang.ada
 help / color / mirror / Atom feed
From: "Matt" <matt.brewster@btinternet.com>
Subject: Re: Ada Query...
Date: 2000/03/26
Date: 2000-03-26T00:00:00+00:00	[thread overview]
Message-ID: <8blgui$d46$1@plutonium.btinternet.com> (raw)
In-Reply-To: 8bl19p$381$1@nnrp1.deja.com

I am not using any book at the moment...I can't find it!

I don't want the procedure at the top of the main program, mainly because
it's huge and I don't want the program to be too congested, and also other
people in the team may wish to use it in their section of code. So to put a
finer point on it, I want this code outside the 'main' program, that can be
accessed by the 'main' program and other functions etc. I can write a
package including this source code, but (?) does a package have to consist
of functions? Can the package spec and body contain procedures, just like as
if I wrote the code at the top of the main program? (Because i want to call
it this way). There is already a package in the 'main' program (PROCEDURE
Load IS etc ect..), and I implement it by simply calling the phrase Load;
anywhere in my program. I want the same sort of thing from this 'search'
part of the code, to call it using a phrase like Search; anywhere in the
source code. The trouble is, unlike the Load procedure, i want the
definition and body of this sub-program elsewhere, and want to call it in my
program and a few others. Can this be done?
Regards,
Matt.


Robert Dewar <robert_dewar@my-deja.com> wrote in message
news:8bl19p$381$1@nnrp1.deja.com...
> In article <8bkv48$dcm$1@uranium.btinternet.com>,
>   "Matt" <matt.brewster@btinternet.com> wrote:
> > Yo.
> > Having a bit of trouble with Ada95 at the moment.
> > What i want to know is- can you write a function that returns
> no result
>
> This is so fundamental, that one has to ask what source
> materials you are using. You need a reasonable Ada text book
> if you are going to try to program in Ada 95, trying to do
> it by rough approximation and reading examples is unlikely
> to work. Absolutely any text book will introduce procedures
> almost immediately, so that's why I ask the question.
>
> Incidentally the idea of a "function returning no result" is
> a bit like a car without a wheel, the notion of returning
> a result is what makes a function a function!
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.






  reply	other threads:[~2000-03-26  0:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-26  0:00 Ada Query Matt
2000-03-26  0:00 ` Robert Dewar
2000-03-26  0:00   ` Matt [this message]
2000-03-26  0:00     ` tmoran
2000-03-26  0:00     ` Lab. - konto NDG-48
2000-03-26  0:00     ` Robert Dewar
2000-03-26  0:00     ` Preben Randhol
2000-03-26  0:00 ` Marin D. Condic
2000-03-26  0:00 ` Pascal Obry
2000-03-26  0:00 ` Ken Garlington
2000-03-27  0:00   ` Ted Dennison
2000-03-27  0:00 ` phodgpacker
2000-03-27  0:00   ` Ken Garlington
2000-03-27  0:00     ` Marin D. Condic
2000-03-27  0:00   ` Robert Dewar
replies disabled

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