Scott Rossi wrote:
Another consideration -- assuming that at least 99 percent of developers
code in lower case, line 1 below might appear to be more ambiguous than line
2:

  put 25 into a

  put 25 into A

IMO, line 1 has the *appearance* of an incomplete script, while in line 2,
there *may* be missing script but the upper case character is a clue that
"A" was intended as a variable name.

But neither would be optimal as "a" is a reserved token (used as part is the "there is a" operator). Oddly enough the compiler accepts it, but I try to avoid reserved tokens; I could have sworn I'd run into a case where using "a" as a var name gave me trouble, but I can't reproduce it now.

Point taken just the same. To help make things more visually distinct I usually start my custom handlers with an upper-case letter, and leave built-in calls starting with lower-case, e.g.:

  on mouseUp
   global gMyVar
   set the title of this stack to MyFunction()
   DoSomething
   put version() into gMyVar
  end mouseUp

The assumption is that it's more likely that the things that break will be mine more often than the engine's <g>, so I make mine stand out to be easier to find when skimming.

--
 Richard Gaskin
 Fourth World Media Corporation
 __________________________________________________
 Rev tools and more: http://www.fourthworld.com/rev
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to