how to check for unnecessary local declarations?

Kay C Lan lan.kc.macmail at gmail.com
Thu Jul 2 02:09:17 EDT 2015


Bob, I think you would need to remove the astrisks otherwise if you have
single letter variables (many use them as counters in repeat loops) or
words that may appear in other words - lStart, lStartSearch - you could
easy miss some.



On Thu, Jul 2, 2015 at 5:47 AM, Bob Sneidar <bobsneidar at iotecdigital.com>
wrote:

> Seems you could write a handler to do it pretty easily.
>
> <pseudocode>
> — get stack script
> — find “local “
> — get word 2 of found line
> — filter with “*” & word 2 of found line & “*”
> — count number of lines. if only 1 then delete that line
> — get list of cards
> — repeat for every card
> — get card script
> — what I just said
> — get list of objects on card
> — repeat for every object on card
> — get script of object
> — do I have to repeat myself again??
> </pseudocode>
>
> It might be a little more complicated if you have multiple local variable
> declarations, but not much.
>
> Bob S
>
>
> > On Jul 1, 2015, at 06:44 , Tiemo Hollmann TB <toolbook at kestner.de>
> wrote:
> >
> > Hello,
> >
> > I am using the strict compilation mode. When working over longer time on
> a
> > project it regularly happens that I have orphaned local variable
> > declarations.
> >
> > Actually they don't hurt, but I like to keep my code clean and wonder if
> > there is any hidden feature, which checks for not any more needed local
> > declarations (beside scripting a check myself)?
> >
> > Thanks
> >
> > Tiemo
> >
> >
> >
> >
> >
> >
> >
> > _______________________________________________
> > use-livecode mailing list
> > use-livecode at lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list