[thelist] [ASP] Silly behaviour with Classes

Joshua Olson joshua at waetech.com
Sat Nov 29 17:46:46 CST 2003


The following snippet is returning different values on different servers:

<%
  Class clsTest
    Public testArr()

    Public Sub Class_Initialize
      Dim testArr(20)
      Response.Write "TypeName within intializer: " & TypeName(testArr) &
"<br />"
    End Sub

  End Class

  Set oTest = new clsTest

  Response.Write "TypeName outside intializer: " & TypeName(oTest.testArr) &
"<br />"
%>

Seems pretty straight forward... it simply creates a class (which
initializes an array) and then displays the type of the variable.

On one machine the output is:

TypeName within intializer: Variant()
TypeName outside intializer: Variant()

On the other it's:

TypeName within intializer: Variant()
TypeName outside intializer: Empty

3 Words: "What the heck"?

Any thoughts on why two machines (both running ASP/IIS/Win2k Server) would
look at the same code and return different results?

TIA

<><><><><><><><><><>
Joshua Olson
Web Application Engineer
WAE Tech Inc.
http://www.waetech.com
706.210.0168



More information about the thelist mailing list