-
February 22nd, 2021, 03:59 #1
New Programming Style? Programming Convention?
In CoreRPG\common\scripts\combobox.lua
I notice the variables of modular (file) scope are prefaced with an underscore character, as in:
Code:local _bReadOnly = false; local _bActive = false; local _tItems = {}; local _tOrderedItems = {};
Have got that right, it is just a new convention? Not something more than that? Correct?Current Projects:
Always...
Community Contributions:
Extensions: Bardic Inspiration, Druid Wild Shapes, Local Dice Tower, Library Field Filters
Tutorial Blog Series: "A Neophyte Tackles (coding) the FG Extension".
-
February 22nd, 2021, 08:25 #2
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,539
My convention styles tend to shift over time. I'm trying out using _ for variables global to a script, but localized within the script scope.
Regards,
JPG
-
February 22nd, 2021, 14:15 #3
K. Thank you.
You’ve really thrown Field Filters for All Libraries into conniptions. But what the “hey”...
As I have become more and more familiar with ruleset script, I’ve often wondered why FG variables of scope greater than local (function) were not tagged in some way. Years ago I used “m” (modular) as in “mbReadOnly” and the despised “g” for project global.
Thanks again for the quick reply.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks