#IFNDEF or similar

Results 1 to 2 of 2

Thread: #IFNDEF or similar

  1. #1
    DRoot Guest

    Default #IFNDEF or similar

    I have an asp of generic routines that may be #included on a variety of pages. Depending on the situation, it may be included twice, which will give the Name Redefined error for any variable or Sub. Is there any way to check to see if it has already been included, and suppress it if it has? I tried #IFNDEF, and that didn't seem to work. I also tried an IF-Then in the ASP, but apparently DIM is processed before any logic statements. 'On error resume next' doesn't work either... Any ideas?

  2. #2
    Join Date
    Dec 1969

    Default You are out of luck...

    Sorry, but you are looking for a concept that is too sophisticated for VBScript.<BR><BR>The best I can offer is that you do *NOT* do a DIM, at all. Then you can&#039;t get the redefined error.<BR><BR>And, yes, you are right that DIM is processed before execution of the code. I think I mentioned that in one of the ASPFAQs (in the topic "the Nature of Things", in a Q&A about include files).<BR><BR>

Posting Permissions

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