Dim ing Global varables

Results 1 to 3 of 3

Thread: Dim ing Global varables

  1. #1
    Join Date
    Dec 1969

    Default Dim ing Global varables

    im having trouble setting global varables in a case loop <BR>and then resetting them later on, currently if i dont set them at the global level it has no idear of what they are or wont set any varables<BR><BR>whats up?

  2. #2
    Join Date
    Dec 1969

    Default You can only DIM a variable once...

    ...but you can assign a value to it as often as you need.<BR><BR>SO move the DIM *outside* *ANY* loops.<BR><BR>If I didn&#039;t understand your question, then show your code.<BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default More info on Dim

    In VB and asp, Dim statements are processed only once. So it doesn&#039;t matter if a Dim is put in a loop but I agree it is bad practice to put the Dim statement inside a loop.<BR>In asp, Dim statements are processed first so such statements can be placed anywhere in the file, even after that variable is called for in the program. But in VB Dim statement must preceed the calling of the variable.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts