MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Can one have different Coloring to show which local symbols are not used in a module?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg108709] Re: Can one have different Coloring to show which local symbols are not used in a module?
  • From: Bill Rowe <readnews at sbcglobal.net>
  • Date: Sun, 28 Mar 2010 04:08:53 -0500 (EST)

On 3/27/10 at 5:11 AM, nma at 12000.org (Nasser M. Abbasi) wrote:

>Many times when I write some module, I add local symbols, then later
>I might change the code and those symbols will no longer be used.

>For example

>f[x_]:=Module[{a,b},...  a=...; ....]

>Suppose that 'a' is still used, but 'b' is not used inside the
>module. Both will be colored green as things are now.

>It would be nice, if a new color is made for symbols that are local,
>but NOT used, i.e not referenced.

>Right now, I have to check for each symbol, one by one, by doing
>Find, to see if I am still using it or not.

An alternative to Find would be to delete each symbol one at a
time. If the symbol is used, its color in the remaining code
will change to blue (assuming that same name is not assigned a
value outside the module) making it fairly easy to spot. This
approach is still somewhat tedious. But I find it a little less
so than using Find to search for each symbol one by one.



  • Prev by Date: Re: Calling kernel.dll from Mathematica
  • Next by Date: Re: A general problem with numerical functions defined
  • Previous by thread: Can one have different Coloring to show which local symbols are not used in a module?
  • Next by thread: Re: Can one have different Coloring to show which local symbols are not used in a module?