Scope Vs Extent

B

bparanj

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.
 
A

ara.t.howard

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://codeforpeople.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top