Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Documentation of global variables

Featured Replies

Hi all.

Is there a "best practice" on how (and where) to document the global variables used in a solution?

Thanks!

I've never heard of a 'best' way to do this, but I initially have a white board that has them all written down and to which file it belongs to (if a multi-file solution). Once I'm done with the solution, I create an electronic document of everything on the white board, so I can refer back to later if need be.

It also might be helpful to have a brief description of what each one is for, and what info it might or should contain. But I just use script comments for that.

Regular or local variables I don't worry too much about documenting, except for adding a script comment.

BrentHedden is right there is probably no ideal way to document them, except staying away from them so they always only live in just one object as local, by using script results instead.

The key to it, is to regard the tool a little more object oriented, this means sparsingly use of anything global, being it fields or paramters. Perhaps you should regard the use of globals a rescue only, not something to be used on a daily basis!!!

Two scripting techniques makes the use of globals as such, easy to avoid:

Either this:

http://edoshin.skeletonkey.com/2006/02/options.html#more

or this:

http://fmforums.com/forum/showpost.php?post/187787/

--sd

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.