MathGroup Archive 2010

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

Search the Archive

Re: Weird vanishing syntax coloring

  • To: mathgroup at
  • Subject: [mg107462] Re: Weird vanishing syntax coloring
  • From: Bill Rowe <readnews at>
  • Date: Sat, 13 Feb 2010 05:23:30 -0500 (EST)

On 2/12/10 at 4:40 AM, hpr at (Helen Read) wrote:

>Anyway, my students get very used to the syntax coloring, which they
>pick up without any class discussion. When they start defining
>functions themselves using Set, they notice that the variable(s) on
>the RHS of the function definition are blue, and not green the way
>they are when they use the Define Function button. This makes them
>worry that they did something wrong, even though all is well.

>It's not a huge deal, but I just wonder if this is a bug or a
>feature of the syntax coloring.

I this is a feature of syntax coloring. With SetDelayed, you are
localizing variables named on the LHS. So, when they appear on
the RHS they have the color appropriate to localized variables.

But with Set, there is no localization and variables on the RHS
are global variables. Consequently, they have the color
appropriate to global variables.

  • Prev by Date: Re: Covariant derivatives of tensors?
  • Next by Date: Can I set Page Setup scale for a notebook programmatically?
  • Previous by thread: Re: Weird vanishing syntax coloring
  • Next by thread: arrows disappear in exported 3D graphic