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)
-
40:13
Clownfish TV
10 hours agoMagic the Gathering Champion BANNED from Tournament Over MAGA Hat?! | Clownfish TV
2.33K17 -
2:49:47
TimcastIRL
3 hours agoTrump Considers Invoking INSURRECTION ACT To Deploy National Guard to Portland | Timcast IRL
134K65 -
10:05:38
Dr Disrespect
11 hours ago🔴LIVE - DR DISRESPECT - BLACK OPS 7 - GIVE ME BACK MY NUKE
121K12 -
LIVE
Drew Hernandez
1 hour agoTARGETED LEFTIST TERRORIST ATTACK IN CHICAGO & ISRAEL GEOFENCING U.S. MEGA CHURCHES
862 watching -
8:58
Degenerate Jay
12 hours agoXbox Game Pass Is Getting Ridiculous
2.19K -
7:03
GBGunsRumble
1 day agoGBGuns Range Report 05OCT25
1.43K1 -
1:32:30
Glenn Greenwald
8 hours agoWill the War in Gaza Finally End? Flotilla Activists Predictably Abused in Israel's Dungeons; Van Jones' Revealing Joke about "Dead Gazan Babies" | SYSTEM UPDATE #527
84.6K63 -
LIVE
SpartakusLIVE
4 hours ago#1 King of Content brings MOTIVATION to the MASSES on Monday
504 watching -
1:48:32
megimu32
3 hours agoON THE SUBJECT: 2000s Hits That Vanished! 🎶
4.55K1 -
12:19
China Uncensored
10 hours agoWas This Death China's Turning Point?
9.05K33