Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

string class

Status
Not open for further replies.

newtoASP

Programmer
Jun 1, 2001
40
US
I am attempting to use a stringbuilder class in an asp page and getting the following error in an included asp file:
Microsoft VBScript compilation error '800a03ea'

Syntax error

/templates/StringClass.asp, line 2

Class clsString
^

The code for stringclass.asp is:
<%
Class clsString

Private m_intLength
Private m_intCounter
Private m_arrString()

Private Sub Class_Initialize()
'Dim an array and set position counter
m_intCounter = 1
m_intLength = 100
Redim m_arrString(m_intLength)
End Sub

Public Sub Reset
'Erase current array and recreate
Erase m_arrString
Call Class_Initialize()
End Sub

Public Property Get Value
'Use Join function to create final string
Value = Join(m_arrString,&quot;&quot;)
End Property

Public Sub Add(byval strValue)
Dim intArrLen
'Add value to string array
intArrLen = Ubound(m_arrString)
If m_intCounter > intArrLen Then _
Redim Preserve m_arrString(intArrLen + m_intLength)
m_arrString(m_intCounter) = strValue
'Incriment position counter
m_intCounter = m_intCounter + 1
End Sub
End Class

%>

This error occurs before the class is even instantiated. Any idea why?

Thanks.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top