🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #5246

Re: Var scoping in Wirth-type languages (was: Poor Algorithms)

#5246
From: Michael Schmidt
Date: Thu, 10 Mar 1988 16:51
15 lines
1166 bytes
Posting-Front-End: Gnews 1.1


In article <3949@ihlpf.ATT.COM>, nevin1@ihlpf (00704a-Liber) writes:
> If some vars are declared 'globally' (at the topmost level), it is very
> inefficient to access those variables in a procedure declared more than 1
> or 2 levels deep.  There is a way to implement scoping that alleviates this
> inefficiency, however.

I think the most UN*X compilers do it rather efficient. The
global variables are allocated in the bss (or data) segment. So
the access to global *and* local variables doesn't require to
follow the static chain.

	Michael Schmidt
Technical Details
Message-ID: <4760@sigi.Colorado.EDU>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!hao!boulder!michael@boulder.Colorado.EDU
References: <3821@ihlpf.ATT.COM> <2791@enea.se> <3949@ihlpf.ATT.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!hao!boulder!michael@boulder.Colorado.EDU
From: michael@boulder.Colorado.EDU (Michael Schmidt)
Newsgroups: comp.lang.misc
Subject: Re: Var scoping in Wirth-type languages (was: Poor Algorithms)
Message-ID: <4760@sigi.Colorado.EDU>
Date: 10 Mar 88 16:51:42 GMT
References: <3821@ihlpf.ATT.COM> <2791@enea.se> <3949@ihlpf.ATT.COM>
Sender: news@sigi.Colorado.EDU
Reply-To: michael@boulder.Colorado.EDU (Michael Schmidt)
Organization: Uni-GH Paderborn, FB17/Informatik
Lines: 12
In-reply-to: nevin1@ihlpf.ATT.COM (00704a-Liber)