From: fluffy_puff@dsuper.net
Subject: Re: scope and/or parameters (beginner)
Date: 1999/04/10
Date: 1999-04-10T00:00:00+00:00 [thread overview]
Message-ID: <370f88bb.1562410557@news.dsuper.net> (raw)
In-Reply-To: 7ei04q$o$1@nnrp1.dejanews.com
On Thu, 08 Apr 1999 10:24:29 GMT, czgrr <czgrr@my-dejanews.com> wrote:
>> The fact that a sub-program is declared INSIDE another, as
>> opposed to OUTSIDE of it, makes no difference from the point of
>> view of the compiler. As long as any call to a sub-program is
>> made AFTER its declaration it is treated exactly the same way.
>The short answer:
>For the usage you gave in your original message, yes it makes no difference.
>
>The long answer, part 1:
>
>It does make one important difference. In the same way as local variables are
>not accessible outside the routine they are declared in, declaring a routine
>inside another limits the scope (accessibility) of that routine.
I should have said "as long as the sub-program called is 'visible' or
'within the scope' instead of 'declared before'".
>The long answer, part 2:
>
>This business about calling something after its declaration, ...
>Of course, if you have written specs and bodies, this is exactly the same as a
>declaration in the spec - you can think of a spec as coming "before" anything
>in the body, and so you can call anything in a package's spec from anywhere
>within that package.
>
>Phew! Some more things to play with, eh?
>HTH, czgrr.
Thanks for part 2. We haven't, in my course, written *specs* and
*bodies*. I'll soon enough learn the .ADS/.SPC and .ADB/.BDY files
relations. All I've done so far is register an .ADS file and an .ADB
file in a Project to use the sub-programs they contain (a version of
the ANSI "Screen" package).
Thanks again.
Marc
--
What I really am is "fluffy", no "_dong",
no "_puff", no "_woo", no nothing, just plain fluffy.
next prev parent reply other threads:[~1999-04-10 0:00 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-04-02 0:00 scope and/or parameters (beginner) fluffy_pink
1999-04-03 0:00 ` Matthew Heaney
1999-04-05 0:00 ` Corey Ashford
1999-04-05 0:00 ` fluffy_doo
1999-04-06 0:00 ` Matthew Heaney
1999-04-08 0:00 ` czgrr
1999-04-10 0:00 ` fluffy_puff [this message]
1999-04-12 0:00 ` dennison
1999-04-13 0:00 ` czgrr
1999-04-13 0:00 ` Robert Dewar
1999-04-14 0:00 ` czgrr
1999-04-14 0:00 ` dennison
1999-04-14 0:00 ` Robert Dewar
1999-04-15 0:00 ` czgrr
1999-04-15 0:00 ` Robert Dewar
1999-04-13 0:00 ` Robert Dewar
1999-04-13 0:00 ` Robert A Duff
1999-04-14 0:00 ` Robert Dewar
1999-04-14 0:00 ` Hyman Rosen
1999-04-14 0:00 ` dennison
1999-04-14 0:00 ` Hyman Rosen
1999-04-14 0:00 ` dennison
1999-04-14 0:00 ` Hyman Rosen
1999-04-15 0:00 ` dennison
1999-04-15 0:00 ` Robert Dewar
1999-04-15 0:00 ` dennison
1999-04-15 0:00 ` Hyman Rosen
1999-04-15 0:00 ` Robert Dewar
1999-04-15 0:00 ` Hyman Rosen
1999-04-15 0:00 ` Robert Dewar
1999-04-15 0:00 ` Hyman Rosen
1999-04-16 0:00 ` Rakesh Malhotra
1999-04-15 0:00 ` fluffy_dong
1999-04-15 0:00 ` Robert Dewar
1999-04-15 0:00 ` dennison
1999-04-15 0:00 ` fluffy_dong
1999-04-16 0:00 ` Robert Dewar
1999-04-16 0:00 ` Fraser Wilson
1999-04-16 0:00 ` Gautier.DeMontmollin
1999-04-20 0:00 ` Nick Roberts
1999-04-21 0:00 ` fraser
1999-04-22 0:00 ` Robert A Duff
1999-04-22 0:00 ` Larry Kilgallen
1999-04-16 0:00 ` Samuel Mize
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox