Hiding Context in Variable Names
- To: mathgroup at yoda.physics.unc.edu
- Subject: Hiding Context in Variable Names
- From: Scott Herod <sherod at picard.colorado.edu>
- Date: Fri, 20 Nov 92 15:36:08 -0700
( Most people may be aware of this but since it relates to my
recent post on context names I will send it also. )
In my last post I was asking about removing context names from
printed variables. Bruce Fast suggested a fix. However, some
of my variables were still printed "MyPackage`Private`name".
It turned out that I used "name" as one of the dummy names in my
init.m file. Mathematica still recorded that the variable had been
used in the Global` context and so in order to avoid confusion included
the whole context path later.
Two tricks to avoid this:
(1) Always use good dummy names for dummy variables. dummyx
comes to mind.
(2) Use lower case letters as the first letter in a dummy name and
make the last line in your init.m file
Be careful that you don't create something in your startup
file that begins with a lower case letter that you want to keep.
Or you could create it after the Remove statement.
University of Colorado, Boulder
(sherod at newton.colorado.edu)
Prev by Date:
What should Mma be?
Next by Date:
Previous by thread:
Re: What should Mma be?
Next by thread:
Inequalities posting: Inequalities.m