Interview Questions

What are LOCAL and GLOBAL variables?

ASP Interview Questions and Answers


(Continued from previous question...)

27. What are LOCAL and GLOBAL variables?

Local variables lifetime ends when the Procedure ends. Global variables lifetime begins at the start of the script and ends at the end of the script and it can be used by any procedure within the script. Declaring a variable by using the keyword PRIVATE makes the variable global within the script, but if declared using PUBLIC, then all scripts can refer the variable.

(Continued on next question...)

Other Interview Questions