Home > Articles

  • Print
  • + Share This

Local Variables

Local variables are declared within a procedure. The variable lives only as long as the procedure is in force. After the procedure terminates, the variable is removed from memory and the value assigned to it vaporizes.

Please look at the code in Listing 3.11. Notice that the event procedures image1_OnMouseMove() and button1_OnClick() have a variable, s. These are two distinct variables. Each s variable is local to the specific event procedure. Each variable is created when the event procedure is run. When the event procedure ends, the s variable is removed from memory.

  • + Share This
  • 🔖 Save To Your Account

Related Resources

There are currently no related titles. Please check back later.