[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Scope Vs Extent

bparanj@gmail.com

7/23/2008 11:39:00 PM

Wikipedia definition:

The scope of a variable describes where in a program's text, the
variable may be used, while the extent (or lifetime) describes when in
a program's execution a variable has a value. The scope of a variable
is actually a property of the name of the variable, and the extent is
a property of the variable itself.

Are they defined the same way in Ruby? TIA.
1 Answer

ara.t.howard

7/24/2008 3:43:00 AM

0


On Jul 23, 2008, at 5:34 PM, bparanj@gmail.com wrote:

> Wikipedia definition:
>
> The scope of a variable describes where in a program's text, the
> variable may be used, while the extent (or lifetime) describes when in
> a program's execution a variable has a value. The scope of a variable
> is actually a property of the name of the variable, and the extent is
> a property of the variable itself.
>
> Are they defined the same way in Ruby? TIA.



extent = scope

lexical scope = scope

in 'normal' ruby parlance.


a @ http://codeforp...
--
we can deny everything, except that we have the possibility of being
better. simply reflect on that.
h.h. the 14th dalai lama