Premium Only Content

EasyLanguage Tutorial 196 | Scope in methods (plus convert a function to a method) | Part 1
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)
-
28:46
DeVory Darkins
14 hours ago $14.75 earnedPritzker HUMILIATED after brutal fact check as Democrat candidate calls for political assassination
24.4K96 -
19:54
Forrest Galante
11 hours agoPrivate Tour Of America's Best Marine Animal Facility
37.7K7 -
9:25
MattMorseTV
1 day ago $18.58 earnedSupreme Court just DROPPED a NUKE.
32.3K69 -
13:25
Nikko Ortiz
1 day agoWorst Karen TikTok Fails
32.9K10 -
40:24
The Connect: With Johnny Mitchell
2 days ago $22.21 earnedInside The WORST Drug-Infested Slums Of Medellin, Colombia
72.9K30 -
4:14
GritsGG
17 hours ago2 Warzone Easter Eggs! How to Find Them EASILY!
24.4K2 -
LIVE
Lofi Girl
2 years agoSynthwave Radio 🌌 - beats to chill/game to
374 watching -
1:45:43
Man in America
17 hours agoThe DISTURBING Truth About Parasites — Live Q&A w/ Dr. Jason Dean
91.4K42 -
7:13:47
SpartakusLIVE
13 hours ago#1 Mountain of Muscle with HUGE Legs saves your weekend from complete BOREDOMNight HYPE
52.8K1 -
47:42
Sarah Westall
14 hours agoFreedom or Slavery? AI will Change Everything w/ Trump Senior Advisor Marc Beckman
71.1K18