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)
-
2:36:49
Barry Cunningham
3 hours agoSUNDAY NEWS ROUNDUP: President Trump Attends Wedding | Talk Shows Worried About Tulsi | And More!
32.7K23 -
2:26:19
Nerdrotic
5 hours ago $0.39 earnedThe REDACTED Files Dropped | Dark Underworld Uncovered | Forbidden Frontier #127
35K2 -
1:08:27
Sarah Westall
4 hours agoThe People Driving Canada’s MAID Program — And Why | Kelsi Sheren
10.1K1 -
37:16
The HotSeat With Todd Spears
4 hours agoCrowned and Called with Kendra Spears
22.7K44 -
DVR
IsaiahLCarter
8 hours ago $0.21 earnedCanceling Woke, in 2026 || APOSTATE RADIO 042 (Paul D. Rossi, Matthew Mastronardi)
16.4K1 -
1:32
The Dan Bongino Show
8 hours agoDo I have scores to settle on my show? You're damn right
242K310 -
14:34
Crowder Bits
1 day agoThis Is Why Democrats Can’t Win Without Open Borders
56.2K37 -
1:30:59
The Attorney Andrew Branca Show
9 hours agoFederal Court: ICE WINS! MN LOSES! PLUS Federal ID Order!
70.6K35 -
1:23:05
MattMorseTV
9 hours ago $1.47 earned🔴The Dems. have a "NEW STRATEGY."🔴
158K419 -
13:20
Full Ahead
23 days ago $4.56 earnedMiami: The City of Tomorrow 4K Walking Tour
48.8K11