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:14:08
Barry Cunningham
10 hours agoLIVE BREAKING NEWS: President Trump Addresses The Nation! And More News!
72.6K31 -
5:15:27
ThatStarWarsGirl
12 hours agoTSWG LIVE: Discussing STAR WARS News with Special Guest Star Wars Theory!
52.1K5 -
2:42:40
Laura Loomer
10 hours agoEP162: LIVE: President Trump Addresses The Nation
71.2K33 -
1:32:05
Adam Does Movies
15 hours ago $12.45 earnedRob Reiner Films + Movie News + AMA - Live!
46.9K2 -
47:57
Professor Nez
14 hours ago🚨LIVE NOW: President Trump Addresses the Nation from the Oval Office
50.1K42 -
28:17
The White House
11 hours agoPresident Trump Delivers an Address to the Nation
125K166 -
4:44:53
Drew Hernandez
1 day agoTRUMP ADDRESSES THE NATION & BONGINO ANNOUNCES FBI DEPARTURE?
79.4K34 -
2:37:30
Badlands Media
21 hours agoBadlands Media Special Coverage - MY FELLOW AMERICANS the Alpha Warrior Show & Redpill Project
81K43 -
22:54
Jasmin Laine
16 hours agoMedia MELTS DOWN as Poilievre Surges—Ottawa Loses Control of the Narrative
39.9K21 -
59:50
BonginoReport
13 hours agoDan Bongino Is Leaving The FBI - Nightly Scroll w/ Hayley Caronia (Ep.199)
299K269