IF/else Dim tmpArr

Results 1 to 2 of 2

Thread: IF/else Dim tmpArr

  1. #1
    Join Date
    Dec 1969

    Default IF/else Dim tmpArr

    I have an if/else construction that for some reason doesnt&#039; work according to logic, and I get an error that Dim tmpArr has been redefined. But that should only be if the condition has not been met.<BR><BR>if session("buyerid")="buyername" then<BR><BR>Dim tmpArr<BR>etc.<BR><BR>Else<BR><BR>Dim tmpArr<BR>etc2.<BR>end if

  2. #2
    Eddie Campbell Guest

    Default RE: IF/else Dim tmpArr

    Sorry, you can&#039;t do that. ASP will consider that as two attempts to dim the same variable. <BR><BR>But why do you need to do that anyway? Why not just dim it once before the start of your if..then..else statement? It will then work and your code will be shorter :)

Posting Permissions

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