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)
-
1:50:53
Steven Crowder
4 hours agoExposing 3 Major Anti-Trump LIES - What You Need to Look For
285K212 -
2:10:20
The White House
3 hours agoPresident Trump Participates in a Cabinet Meeting, Apr. 30, 2025
37.5K46 -
3:20:58
Right Side Broadcasting Network
5 hours agoLIVE REPLAY: President Trump Holds a Cabinet Meeting - 4/30/25
72.2K28 -
LIVE
Rebel News
1 hour ago $1.26 earnedAlberta independence talks, Quebec rejects oil, Conservatives ponder future | Rebel Roundup
789 watching -
The Charlie Kirk Show
2 hours agoIslam In Texas? + 100 Days Review + Remembering David Horowitz | Halperin, Cernovich | 4.30.25
29.3K5 -
The Mel K Show
3 hours agoMORNINGS WITH MEL K - 4/30/25
28.3K6 -
LIVE
The Dana Show with Dana Loesch
1 hour agoTAKEAWAYS FROM TRUMP'S 100-DAY INTERVIEW | The Dana Show LIVE on Rumble! WEDNESDAY APRIL 30TH 2025
425 watching -
1:01:38
Blockchain Basement
2 hours ago $0.22 earned🚨BITCOIN BOOM STARTS NOW!? (Trump Launches NEW Token!)
6.76K -
1:08:49
The Rubin Report
3 hours agoHost Gets Visibly Angry as His Trap for Trump Backfires
51.7K13 -
DVR
Benny Johnson
3 hours agoLIVE Trump Cabinet Meeting Right Now in White House, Trump Torching Media | Michelle Obama MELTDOWN
73K61