MathGroup Archive 2010

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

Search the Archive

Re: Weird vanishing syntax coloring

  • To: mathgroup at
  • Subject: [mg107414] Re: Weird vanishing syntax coloring
  • From: Helen Read <hpr at>
  • Date: Fri, 12 Feb 2010 04:40:46 -0500 (EST)
  • References: <hl0omd$t2d$>

On 2/11/2010 6:12 AM, John Fultz wrote:
> Variables only show in dark blue if they have no value.  They show in black if
> they've been assigned a value of some sort.  This aspect of the syntax coloring
> is not static, as with many other editing systems, but dynamic based upon the
> state of the kernel.

Speaking of syntax coloring, here's something that bothers my students a 
little. Most of them start off the year relying heavily on the Classroom 
Assistant palette, and gradually wean themselves from it as they get the 
hang of Mathematica syntax and get sick of all the point-and-click. In 
particular, they use the Define Function button for a while, and then 
they start just typing in their own functions. Usually if they enter a 
function themselves, they use Set as opposed to Set Delayed.

(Defining functions with Set is fine for most of our work, and in fact 
before we had the fancy palettes, I taught them to define function with 
Set, and in the instances later on when we needed Set Delayed, I talk 
about the difference and why we needed it. One advantage of starting 
with Set for beginners is you get immediate output when you define your 
function, and can often catch errors such as missing parentheses. I'd 
actually like *two* Define Function buttons on the Classroom Assistant, 
one using Set and one using SetDelayed.)

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.

Helen Read
University of Vermont

  • Prev by Date: Re: Re: Re: Upright \[Micro] in
  • Next by Date: Re: Define an antisymmetric function
  • Previous by thread: Re: Weird vanishing syntax coloring
  • Next by thread: Re: Weird vanishing syntax coloring