Re: Weird vanishing syntax coloring
- To: mathgroup at smc.vnet.net
- Subject: [mg107462] Re: Weird vanishing syntax coloring
- From: Bill Rowe <readnews at sbcglobal.net>
- Date: Sat, 13 Feb 2010 05:23:30 -0500 (EST)
On 2/12/10 at 4:40 AM, hpr at together.net (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.