Print Page | Close Window

A lot of undefined variables errors

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=8756
Printed Date: 07 April 2026 at 11:06am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: A lot of undefined variables errors
Posted By: Guerriero4
Subject: A lot of undefined variables errors
Date Posted: 11 January 2004 at 6:21am

I dont know why but i get a lot of 'undefined variable errors'

I fix them but from time to time i get more, it seems kind of random

Do anyone else has that or is it only me????

 



-------------
There's no place like 127.0.0.1



Replies:
Posted By: dpyers
Date Posted: 11 January 2004 at 12:14pm

"Option Explicit"

If you specify that at the head of each asp page, it forces that error for any variable that isn't declared by a "Dim" statement before it's used.

It's a useful programming practice because it will catch any mis-spelled variables. Nothing worse than trying to figure out why something's not working only to find that you misspelled something. It's not required though, and many developers don't use it.

Some editors however, either have an option to insert it if it's not there, or insert it by default. So if you open up a file for editing then save it, you'll get that error for each variable with no Dim statement when it tries to run.



-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: Guerriero4
Date Posted: 11 January 2004 at 2:22pm

oh i see, i forgot the thing about the editors.

thx m8



-------------
There's no place like 127.0.0.1



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net