Object Naming Conventions

Francis Nugent Dixon effendi at wanadoo.fr
Fri Oct 7 07:37:30 EDT 2011


Hi from Beautiful Brittany,

Pete, there has been a thread on this subject several
times, but I'm not against seeing it again.

Whatever you do, use a prefix to define ALL your objects,
but find a rule that suits you. Don't use a suffix, I'm
sure you will regret it.

I use a two-letter indicator (but each to his own poison !)
- only 2 letters (CAPS) and not 3, like Mark !

Custom Properties CPxxx
Global Variables  GVxxx
Local Variables   LVXXX
Fields            Myxxx
Labels            LBxxx
Buttons           BTxxx
Groups            GPxxx
Functions         DFxxx

I also deliberately use  "repeat" variables : I, J, K, etc.
(old Fortran rules, but habits die hard !) It also has the
advantage of being crystal-clear !

It may take a little time to adjust to your new rules
but, if you come back to your scripts in 6 months, you
will be glad you invented them.
I agree with Mark about length of names - one word is enough !

Best Regards

-Francis




More information about the use-livecode mailing list