Forums

ASP

This topic is locked

How to test if variables are declared?

Posted 03 Aug 2006 00:51:59
1
has voted
03 Aug 2006 00:51:59 Christian Houmann posted:
I do a lot of handcoding besides Dreamweavers inserted code. Now i have been aware, that the pages are processed quicker is I use "option explicit", but I have been very sloppy declaring my variables.
Does anyone know about a function/script, that can test my script to find all variables, and see if they are declared. The last thing is not so important, just finding all variables in a page would be helpful. Then I can easily check to see if they are declared.

Replies

Replied 01 Sep 2006 17:42:56
01 Sep 2006 17:42:56 micah santos replied:
using OPTION EXPLICIT will automatically prompt you an error when you haven't declared a certain variable you've used. i think, it's a waste of time to create this kind of function/script that will provide you the list of declared variables. because, you created them and basically, what you really need is an specific uniformity in your script, so you won't have to do something like this.

Reply to this topic