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)
-
LIVE
Nikko Ortiz
50 minutes agoBeing Poor Is A Choice?! - Rumble Studio LIVE
264 watching -
LIVE
Caleb Hammer
2 hours ago$60,000+ For New Boobs | Financial Audit
132 watching -
LIVE
The Big Mig™
2 hours agoRet. Col. Doug Macgregor, Battlefield Legend & Author
4,712 watching -
1:45:19
Dear America
2 hours agoErica Kirk Just Announced As Turning Point CEO!! + Senate Dubs Oct 14th Charlie Kirk Day!!
111K26 -
LIVE
Benny Johnson
1 hour agoStephen Colbert DOUBLES DOWN On Jimmy Kimmel's Lies | Inside Decision to RIP Jimmy Kimmel Off Air...
5,959 watching -
LIVE
Badlands Media
7 hours agoBadlands Daily: September 19, 2025
3,905 watching -
35:08
Colion Noir
19 hours agoA Bear, an AR-15, and a Home Invasion
56.8K9 -
LIVE
Wendy Bell Radio
6 hours agoConsequence Culture
6,652 watching -
1:06:11
Crypto Power Hour
2 hours ago $1.90 earnedSelf-Custody vs Centralized Crypto Card
19.5K7 -
45:45
JULIE GREEN MINISTRIES
4 hours agoWHAT WILL HAPPEN ON SEPTEMBER 23RD PT.1
93.2K359