On 10/9/12 11:28 AM, Peter Haworth wrote:

Still don't understand what "Variable Preservation" was supposed to do
though.  It sounds like a different thing than "explicit variables" or
"variable checking".

It's largely historical now. In the olden days, editing and recompiling a script would wipe the values of script local variables and set them to empty. That meant you had to add lines of code to re-initialize them so they'd still work after every edit. It not only made us crazy, it made the RR team crazy too, so one of the first things they did after RR obtained the engine was to change that. The option to go back to the old behavior is still there but I'd be surprised if anyone actually prefers to use it.


Seems like starting handler local variable names with "t" is pretty common,
although not sure what the "t" represents.  Is there a common convention
for naming script local variables?

Generally "l" or "s", I prefer "s" myself. But it's entirely optional.


I also noticed that some folks declare all their variables in one local
statement at the top of a handler while others declare them in the body of
the code right before they are used for the first time.  I'm guessing this
is just a matter of personal style and preference but any advantages to
either convention?

The engine doesn't care, it's just personal style.

--
Jacqueline Landman Gay         |     jac...@hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to