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)
-
37:07
Kimberly Guilfoyle
5 hours agoAmerica First Energy Revives Our Nation | Ep243
75K30 -
8:58
MattMorseTV
3 hours ago $0.74 earnedTrump just DROPPED the RECEIPTS.
13.4K16 -
LIVE
Robert Gouveia
2 hours agoDemocrats FAIL to APPEAR! Time for WARRANTS?? Victim Speaks Out! Habba FIGHTS!
630 watching -
13:49
Bearing
10 hours agoSydney Sweeny’s N@ZI Jeans?! 💥 Woke Crybabies MELT DOWN Over Pants 🤣
7.88K70 -
Jamie Kennedy
12 hours agoControlled Collapse: How They Normalize the End of the World | Ep 216 HTBITY w/Jamie Kennedy WOF#44
4.65K -
LIVE
The Amber May Show
4 hours agoGlobal Peace, Pharma Shakeups & Historic Deals – w/ Andy Hooser
83 watching -
LIVE
Rallied
3 hours ago $0.64 earnedWARZONE CHALLENGES WITH DRDISRESPECT & BOB
101 watching -
DVR
StoneMountain64
5 hours agoAnswering BATTLEFIELD 6 Questions and Reviewing TOP Clips (BETA DOWNLOADED)
37.8K -
1:18:33
vivafrei
5 hours agoPride Goeth Before the Fall! Derelict Democrats! Tucker Cover-Up? Charlamagne the Blasphemer & MORE!
129K81 -
LIVE
The Rabble Wrangler
5 hours agoRimWorld with The Best in the West!
21 watching