grumbachr Posted June 24, 2008 Posted June 24, 2008 In a script where multiple variable are used is there a way to clear them to nothing once the script is done. I'd love a way to clear all variables with about have to specify each and every one.
David Jondreau Posted June 24, 2008 Posted June 24, 2008 Local script variables (single $) don't need to be cleared. You could arrange your script to only use those. If you're calling subscripts, you'd need to pass those locals to other locals via a Script Parameter.
Fitch Posted June 24, 2008 Posted June 24, 2008 As DJ says, it's best to use local variables unless you have some reason to use globals. As Vaughan notes, you clear a variable the same way you clear a field: setting it to "". One nice technique to know is that you can set multiple variables in one step using a Let calculation like so: Set Variable( $clearMyVars ; Let( [ $$var1 = "" ; $$var2 = "" ; $$var3 = "" ] ; "voila" ) )
Recommended Posts
This topic is 5997 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now