5E Character Create Playlist
  1. #1
    Minty23185Fresh's Avatar
    Join Date
    Dec 2015
    Location
    Goldstone, CA, USA
    Posts
    1,211
    Blog Entries
    29

    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 = {};
    Is this a new convention or style you're employing?
    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".

  2. #2
    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

  3. #3
    Minty23185Fresh's Avatar
    Join Date
    Dec 2015
    Location
    Goldstone, CA, USA
    Posts
    1,211
    Blog Entries
    29
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
5E Product Walkthrough Playlist

Log in

Log in