Jump to content

Script Variables


This topic is 6573 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi everyone,

I have a question about script variables. I fell in love with them when I first learned about them, but I have a problem with global script variables. Are they permanent to a database once created? I know that a local variable only exists while the script is running and that global variables can stretch across sub scripts. I liked this until I noticed that they always seem to have a value in them unless you clear them. Even if I clear them, are they taking up space in my solution. I am moving away fromt the globals but the ones I have used in the past still exist, don't they? Can anyone shed some light on this.

Thanks

Link to comment
Share on other sites

Global variables persist until you close the file in which you defined them. They take up very little memory, so I wouldn't worry about using them.

If you want a "cleaner" approach, try passing variables to subscripts via script parameters.

Link to comment
Share on other sites

This topic is 6573 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.