 |
The Raven Magician
Joined: 13 Oct 2000 Posts: 463
|
Posted: Mon Nov 13, 2006 8:50 pm
Suggestion: Temporary Variables |
I'd like a shorthand way to define local, temporary variables that only last as long as the current script. They cannot be referred to anywhere else in the app, just in the current script, on the current execution of it. They vanish when the script ends. They don't appear in the settings editor at all, they cannot be saved.
Would that be possible? I create lots of temp variables, and it either pollutes the module with leftovers, or it makes the creation of variables messy (putting them in the proper classpath, making them default to null, making a trigger to erase them, etc).
Raven |
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Mon Nov 13, 2006 8:57 pm |
Raven, have you read *any* of the help files or information for CMUD? "Local Variables" is the feature in CMUD that does this and it's been in CMUD for months now. Just put a $ in front of the variable name and it becomes a temporary variable:
#ALIAS test {$temp=123;#SHOW $temp}
Please read the Information for zMUD Users topic in the help file to learn more about changes and new features in CMUD.
As mentioned in the New Features topic:
Quote: |
Local Variables
Local variables are temporary variables that can be used in your scripts which provide huge speed benefits |
|
|
|
 |
The Raven Magician
Joined: 13 Oct 2000 Posts: 463
|
Posted: Mon Nov 13, 2006 9:00 pm |
*cough* Yeah, but like... a few months ago, when I first got CMud. I didn't go back through it more recently. And obviously I forgot about that.
Sorry Zugg. :-/ |
|
|
 |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|