Premium Only Content
EasyLanguage Tutorial 196 | Scope in methods (plus convert a function to a method) | Part 2
Tutorial 196 gives an example of “scope” in the context of a method.
A common guideline in good programming practice suggests that a method should ideally only utilize variables that are provided through its parameter list or those that are locally declared within the method itself. However, there are situations where adhering strictly to this principle might be overly cumbersome or impractical. In such cases, it becomes possible to reference variables that have been declared at a the EasyLanguage study level.
Both “types” of methods are demonstrated in this tutorial.
When a variable is declared within the primary section of a study, it can be directly accessed and modified throughout that study. Nevertheless, when a method is invoked, it operates within its designated scope by design. This means that a variable declared within a method is confined to that method’s scope. Even if a variable with an identical name exists elsewhere, it is treated as a distinct and separate entity, maintaining its own distinct scope within the method.
To demonstrate converting the functions to methods two functions are used:
XAverage (a series function), and
Average( a simple function)
-
48:10
State of the Second Podcast
20 hours agoThe Quietest Suppressor Ever? PTR’s PIP Tech Explained (ft. PTR)
13.1K -
23:10
Demons Row
13 hours agoBiker Secrets They Never Say Out Loud (Real MC Rules Exposed)
11.2K3 -
LIVE
BEK TV
23 hours agoTrent Loos in the Morning - 12/18/2025
188 watching -
15:25
unclemattscookerylessons
1 day ago $2.28 earned“Crispy Cheesy Potato Croquettes | Gooey Mozzarella Inside!”
11.4K5 -
6:39
DropItLikeItsScott
20 hours ago $2.36 earnedDid BURRIS Just Create the Coolest 3-12x42 Scope?
11.8K -
10:55
Paul Joseph Watson
1 day agoWhat Really Happened at Bondi Beach?
78.2K117 -
2:00:58
MG Show
20 hours agoFBI’s CRIMINAL RAID on Mar-a-Lago Confirmed; Rob Reiner BEHIND Russia Collusion?
34.4K14 -
1:00:18
Dialogue works
2 days ago $13.91 earnedLarry C. Johnson: Russia Launches Largest Missile & Drone Attack Yet
33.8K7 -
12:02
Actual Justice Warrior
1 day agoChicago Mayor Says ONLY Black Businesses Get Licensed
27.8K35 -
4:21
SethDrums
4 days ago50 Cent - In Da Club if it was 1950s
28K3