|
rhodges Novice
Joined: 02 Jan 2002 Posts: 33 Location: USA
|
Posted: Fri Apr 23, 2004 8:37 am
Suggestion: Option Explicit |
Zmud creating variables in every default folder is a little tiresome, especially when I go through the effort of creating the variable before hand.
I think a great option is a ripoff of VB's option explicit. This preference would require all variables be declared. To declare the variable, you create it with the #VAR or using the editor.
Doing @varName = "something" would not create a new variable. It would error out if varName hadn't been created. |
|
|
|
Ratalon Beginner
Joined: 08 Apr 2004 Posts: 24 Location: USA
|
Posted: Fri Apr 23, 2004 8:39 am |
I always just let the program create the @vars then moved them to whatever folder by hand.
It doesn't recgonize @vars that you have already created? Are they in the same folder as your trigger or whatever is making them? |
|
|
|
rhodges Novice
Joined: 02 Jan 2002 Posts: 33 Location: USA
|
Posted: Fri Apr 23, 2004 8:47 am |
Sometimes it recognizes them, sometimes it doesn't. Sometimes it creates a copy of it in any folder that is set to default, or the "root" folder most of the time.
|
|
|
|
Pega Magician
Joined: 08 Jan 2001 Posts: 341 Location: Singapore
|
Posted: Fri Apr 23, 2004 11:12 am |
Did you want to do @varName = "something" or varname = "something"?
My advice is to avoid using the a = b assignment of variables.
Disable a = b syntax in your General Parsing preferences, and stick to the #VA command:
#VA [variable] [value] [defaultval] [classname] as stated in the help file.
If you specify the classname using #VA, then variable will always be created in the specified class folder even if the folder was disabled or did not already exist. |
|
|
|
|
|