Jump to content

Documentation of global variables


This topic is 6490 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This topic is 6490 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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