how to check for unnecessary local declarations?

Francis Nugent Dixon effendi at wanadoo.fr
Thu Jul 2 06:20:20 EDT 2015


Hi from Beautiful Brittany (where it is raining, and there is a cool breeze,
while the rest of France is in the high 30’s  :>))

In the same vein,

I declare all my variables “global" in two ways ; the first which will remain
when testing is finished (i.e.. passing info outside the script); the others
which will be commented out after testing. If I return to this stack at a
later date to modify it, I remove the comments until I have finished testing
again. Whenever I “invent” a variable, I always declare it global, either permanent
or temporary, and so I cannot end up have unused variables.
Declaring all variables as global, especially when I have some math in my
scripts, running step by step (debug mode) helps check out my math
easily and efficiently.
All my variable names begin with “GV" or “LV” which helps me not to make
mistakes. Its the stupid mistakes which add to development time.

Oh ! I forgot ! I sleep little, and so during the night, I plan out my stack
development, even to script layout, Next morning I code, and find that I
have done much of the debugging in my head, diring the night.

Anybody out there got any strange quirks like mine ? (more than 50 years
of programming leaves deep scars …. !!!).

-Francis



More information about the use-livecode mailing list