EasyLanguage Tutorial 196 | Scope in methods (plus convert a function to a method) | Part 2
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)
See https://markplex.com/free-tutorials/tutorial-196-scope-in-methods-plus-convert-a-function-to-a-method/
More videos from Markplex
View all →Related videos
Free OST to PST Conversion Using Outlook - Veri...
MailsDaddy Solutions
FIFA 16 Defending Tutorial and Pressure Methods
Dirty Mike
How to grab Methods on a Snowboard (Goofy) - Fr...
Snowboard Addiction
CPAGrip Tutorial Introduction to CPAGrip Beg...
Madanitshrestha
FIFA 21 Passing Tips and Tutorial! BEST Passing...
Sports Gamers Online
Fix HP Laptop Wi-Fi Not Working in Windows 11 /...
VictorExplains
How To Tie Shemagh/Keffiyeh 7 Wrap Methods Tuto...
Audry Ginn
How to grab Methods on a Snowboard (Regular) ...
Snowboard Addiction
Prompt writing and video generation methods for...
东军 廖
30 Minute Money Methods | 30 Minute Money Methods
DavidGilesu
Dr. Fabrizio Fratus: Is it in accordance with s...
A9 TV
By using the deceiving methods of Marxism, the...
A9 TV