Search the web
Sign In
New User? Sign Up
frink
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
revert (reset, whatever) a variable   Message List  
Reply | Forward Message #238 of 255 |
I ran the example from the documentation
for graphics:
g = new graphics.

However in the units.txt datafile,
g is used for the gram units.

Is there some way to revert / reset
a variable (in this case, g)
to the default unit setting,
without closing and reopening the program?

I see that I can do this manually:
g = gram
But if the default isn't known
or is long (like R =
8.314472 m^2 s^-2 kg K^-1 mol^-1 (molar_heat_capacity)
), that's not so easy.

Is there some way to warn that a variable
is already assigned, so it isn't accidentally
changed (like g from grams to a graphics object)?






Fri May 1, 2009 9:13 pm

being_doug
Offline Offline
Send Email Send Email

Forward
Message #238 of 255 |
Expand Messages Author Sort by Date

I ran the example from the documentation for graphics: g = new graphics. However in the units.txt datafile, g is used for the gram units. Is there some way to...
Doug Edmunds
being_doug
Offline Send Email
May 1, 2009
11:14 pm

... Doug, Unfortunately, no, at this point, there is no way to undefine a local variable. If it goes out of scope (e.g. when you exit the function in which...
Alan Eliasen
aeliasen
Offline Send Email
May 5, 2009
8:42 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help